subtle fix for get() function

This commit is contained in:
Niels 2015-04-03 14:20:15 +02:00
parent 7db167afd1
commit b747881466
2 changed files with 4 additions and 4 deletions

View file

@ -808,7 +808,7 @@ class basic_json
/// get an object (explicit) /// get an object (explicit)
template <class T, typename template <class T, typename
std::enable_if< std::enable_if<
std::is_constructible<string_t, typename T::key_type>::value and std::is_constructible<typename T::key_type, string_t>::value and
std::is_constructible<basic_json, typename T::mapped_type>::value, int>::type std::is_constructible<basic_json, typename T::mapped_type>::value, int>::type
= 0> = 0>
inline T get() const inline T get() const
@ -842,7 +842,7 @@ class basic_json
/// get a string (explicit) /// get a string (explicit)
template <typename T, typename template <typename T, typename
std::enable_if< std::enable_if<
std::is_constructible<T, string_t>::value, int>::type std::is_constructible<string_t, T>::value, int>::type
= 0> = 0>
inline T get() const inline T get() const
{ {

View file

@ -808,7 +808,7 @@ class basic_json
/// get an object (explicit) /// get an object (explicit)
template <class T, typename template <class T, typename
std::enable_if< std::enable_if<
std::is_constructible<string_t, typename T::key_type>::value and std::is_constructible<typename T::key_type, string_t>::value and
std::is_constructible<basic_json, typename T::mapped_type>::value, int>::type std::is_constructible<basic_json, typename T::mapped_type>::value, int>::type
= 0> = 0>
inline T get() const inline T get() const
@ -842,7 +842,7 @@ class basic_json
/// get a string (explicit) /// get a string (explicit)
template <typename T, typename template <typename T, typename
std::enable_if< std::enable_if<
std::is_constructible<T, string_t>::value, int>::type std::is_constructible<string_t, T>::value, int>::type
= 0> = 0>
inline T get() const inline T get() const
{ {