mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-04-27 02:16:18 +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 {
|
struct has_as {
|
||||||
private:
|
private:
|
||||||
template <typename U>
|
template <typename U>
|
||||||
static auto check(U*) ->
|
static auto check_(U*) ->
|
||||||
// Check v1 specialization
|
// Check v1 specialization
|
||||||
typename std::is_same<
|
typename std::is_same<
|
||||||
decltype(adaptor::as<U>()(std::declval<msgpack::object>())),
|
decltype(adaptor::as<U>()(std::declval<msgpack::object>())),
|
||||||
T
|
T
|
||||||
>::type;
|
>::type;
|
||||||
template <typename...>
|
template <typename...>
|
||||||
static std::false_type check(...);
|
static std::false_type check_(...);
|
||||||
public:
|
public:
|
||||||
using type = decltype(check<T>(MSGPACK_NULLPTR));
|
using type = decltype(check_<T>(MSGPACK_NULLPTR));
|
||||||
static constexpr bool value = type::value;
|
static constexpr bool value = type::value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ template <typename T>
|
|||||||
struct has_as {
|
struct has_as {
|
||||||
private:
|
private:
|
||||||
template <typename U>
|
template <typename U>
|
||||||
static auto check(U*) ->
|
static auto check_(U*) ->
|
||||||
typename std::enable_if<
|
typename std::enable_if<
|
||||||
// check v2 specialization
|
// check v2 specialization
|
||||||
std::is_same<
|
std::is_same<
|
||||||
@ -92,9 +92,9 @@ private:
|
|||||||
std::true_type
|
std::true_type
|
||||||
>::type;
|
>::type;
|
||||||
template <typename...>
|
template <typename...>
|
||||||
static std::false_type check(...);
|
static std::false_type check_(...);
|
||||||
public:
|
public:
|
||||||
using type = decltype(check<T>(MSGPACK_NULLPTR));
|
using type = decltype(check_<T>(MSGPACK_NULLPTR));
|
||||||
static constexpr bool value = type::value;
|
static constexpr bool value = type::value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ template <typename T>
|
|||||||
struct has_as {
|
struct has_as {
|
||||||
private:
|
private:
|
||||||
template <typename U>
|
template <typename U>
|
||||||
static auto check(U*) ->
|
static auto check_(U*) ->
|
||||||
typename std::enable_if<
|
typename std::enable_if<
|
||||||
// check v3 specialization
|
// check v3 specialization
|
||||||
std::is_same<
|
std::is_same<
|
||||||
@ -52,9 +52,9 @@ private:
|
|||||||
std::true_type
|
std::true_type
|
||||||
>::type;
|
>::type;
|
||||||
template <typename...>
|
template <typename...>
|
||||||
static std::false_type check(...);
|
static std::false_type check_(...);
|
||||||
public:
|
public:
|
||||||
using type = decltype(check<T>(MSGPACK_NULLPTR));
|
using type = decltype(check_<T>(MSGPACK_NULLPTR));
|
||||||
static constexpr bool value = type::value;
|
static constexpr bool value = type::value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user