Skip to content

result_of cannot handle member function pointer to __cdecl function #80

Description

@Kojoley

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions