mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-04-26 18:11:30 +02:00
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:
parent
8c602e8579
commit
e7f7b51005
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user