modified function name 'has_as::check' to avoid ambiguity/conflicts with other libraries/engines's macro definitions (e.g. UE)

This commit is contained in:
hiradyazdan 2023-08-13 18:32:33 +01:00
parent 8c602e8579
commit e7f7b51005
3 changed files with 9 additions and 9 deletions

View File

@ -53,16 +53,16 @@ template <typename T>
struct has_as {
private:
template <typename U>
static auto check(U*) ->
static auto check_(U*) ->
// Check v1 specialization
typename std::is_same<
decltype(adaptor::as<U>()(std::declval<msgpack::object>())),
T
>::type;
template <typename...>
static std::false_type check(...);
static std::false_type check_(...);
public:
using type = decltype(check<T>(MSGPACK_NULLPTR));
using type = decltype(check_<T>(MSGPACK_NULLPTR));
static constexpr bool value = type::value;
};

View File

@ -79,7 +79,7 @@ template <typename T>
struct has_as {
private:
template <typename U>
static auto check(U*) ->
static auto check_(U*) ->
typename std::enable_if<
// check v2 specialization
std::is_same<
@ -92,9 +92,9 @@ private:
std::true_type
>::type;
template <typename...>
static std::false_type check(...);
static std::false_type check_(...);
public:
using type = decltype(check<T>(MSGPACK_NULLPTR));
using type = decltype(check_<T>(MSGPACK_NULLPTR));
static constexpr bool value = type::value;
};

View File

@ -36,7 +36,7 @@ template <typename T>
struct has_as {
private:
template <typename U>
static auto check(U*) ->
static auto check_(U*) ->
typename std::enable_if<
// check v3 specialization
std::is_same<
@ -52,9 +52,9 @@ private:
std::true_type
>::type;
template <typename...>
static std::false_type check(...);
static std::false_type check_(...);
public:
using type = decltype(check<T>(MSGPACK_NULLPTR));
using type = decltype(check_<T>(MSGPACK_NULLPTR));
static constexpr bool value = type::value;
};