Skip to content

Commit

Permalink
modified function name 'has_as::check' to avoid ambiguity/conflicts w…
Browse files Browse the repository at this point in the history
…ith other libraries/engines's macro definitions (e.g. UE)
  • Loading branch information
hiradyazdan committed Aug 13, 2023
1 parent 8c602e8 commit e7f7b51
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions include/msgpack/v1/object_fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
6 changes: 3 additions & 3 deletions include/msgpack/v2/object_fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<
Expand All @@ -92,9 +92,9 @@ struct has_as {
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;
};

Expand Down
6 changes: 3 additions & 3 deletions include/msgpack/v3/object_fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<
Expand All @@ -52,9 +52,9 @@ struct has_as {
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;
};

Expand Down

0 comments on commit e7f7b51

Please sign in to comment.