diff --git a/include/nlohmann/detail/meta/type_traits.hpp b/include/nlohmann/detail/meta/type_traits.hpp index 4ee945cc9..ee028b5d2 100644 --- a/include/nlohmann/detail/meta/type_traits.hpp +++ b/include/nlohmann/detail/meta/type_traits.hpp @@ -437,13 +437,13 @@ template struct is_constructible_tuple> : conjunction...> {}; // to avoid useless casts (see https://github.com/nlohmann/json/issues/2893#issuecomment-889152324) -template < typename T, typename U, std::enable_if_t < !std::is_same::value, int > = 0 > +template < typename T, typename U, enable_if_t < !std::is_same::value, int > = 0 > T conditional_static_cast(U value) { return static_cast(value); } -template::value, int> = 0> +template::value, int> = 0> T conditional_static_cast(U value) { return value; diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 07c1e1ab4..28ce55292 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -3837,13 +3837,13 @@ template struct is_constructible_tuple> : conjunction...> {}; // to avoid useless casts (see https://github.com/nlohmann/json/issues/2893#issuecomment-889152324) -template < typename T, typename U, std::enable_if_t < !std::is_same::value, int > = 0 > +template < typename T, typename U, enable_if_t < !std::is_same::value, int > = 0 > T conditional_static_cast(U value) { return static_cast(value); } -template::value, int> = 0> +template::value, int> = 0> T conditional_static_cast(U value) { return value;