File tree Expand file tree Collapse file tree
include/nlohmann/detail/meta Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -684,11 +684,16 @@ inline constexpr bool value_in_range_of(T val)
684684template <bool Value>
685685using bool_constant = std::integral_constant<bool , Value>;
686686
687+ // Locking the definition of json_compatible_type behind
688+ // JSON_HAS_THREE_WAY_COMPARISON because it seems difficult to
689+ // make use of this type trait well with friend functions. Fails on SFINAE.
690+ #if JSON_HAS_THREE_WAY_COMPARISON
687691template <typename T, typename BasicJsonType, typename U = uncvref_t <T>>
688692struct json_compatible_type
689693{
690694 static constexpr auto value = !is_basic_json<U>::value && is_compatible_type<BasicJsonType, U>::value;
691695};
696+ #endif
692697
693698// /////////////////////////////////////////////////////////////////////////////
694699// is_c_string
Original file line number Diff line number Diff line change @@ -4091,11 +4091,16 @@ inline constexpr bool value_in_range_of(T val)
40914091template<bool Value>
40924092using bool_constant = std::integral_constant<bool, Value>;
40934093
4094+ // Locking the definition of json_compatible_type behind
4095+ // JSON_HAS_THREE_WAY_COMPARISON because it seems difficult to
4096+ // make use of this type trait well with friend functions. Fails on SFINAE.
4097+ #if JSON_HAS_THREE_WAY_COMPARISON
40944098template <typename T, typename BasicJsonType, typename U = uncvref_t<T>>
40954099struct json_compatible_type
40964100{
40974101 static constexpr auto value = !is_basic_json<U>::value && is_compatible_type<BasicJsonType, U>::value;
40984102};
4103+ #endif
40994104
41004105///////////////////////////////////////////////////////////////////////////////
41014106// is_c_string
You can’t perform that action at this time.
0 commit comments