Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

result_of cannot handle member function pointer to __cdecl function #80

Open
Kojoley opened this issue Oct 12, 2021 · 0 comments
Open

Comments

@Kojoley
Copy link
Contributor

Kojoley commented Oct 12, 2021

Might be a root cause of boostorg/phoenix#81

#include <functional>
#include <boost/utility/result_of.hpp>

struct X
{
    bool __cdecl f();
};

using F = decltype(&X::f);

using A = std::result_of<F(X*)>::type;   // fine
using B = boost::result_of<F(X*)>::type; // fails

https://godbolt.org/z/WGMKezqd7

There should be much more of these calling convention stuff that will brakes result of, see https://github.com/boostorg/type_traits/blob/30396ed792697b5a5a7c4f02f7e22ae8d6ad95fd/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant