anonymous namespace renamed to detail
This commit is contained in:
parent
2ee7399b6f
commit
0001032d42
18
src/json.hpp
18
src/json.hpp
@ -98,8 +98,8 @@ struct json_traits;
|
||||
@brief unnamed namespace with internal helper functions
|
||||
@since version 1.0.0
|
||||
*/
|
||||
// TODO transform this anon ns to detail?
|
||||
namespace
|
||||
|
||||
namespace detail
|
||||
{
|
||||
/*!
|
||||
@brief Helper to determine whether there's a key_type for T.
|
||||
@ -143,8 +143,6 @@ struct has_json_traits
|
||||
static constexpr bool value = has_destructor<json_traits<T>>::value;
|
||||
};
|
||||
|
||||
template <> struct has_json_traits<void> : std::false_type {};
|
||||
|
||||
/*!
|
||||
@brief helper class to create locales with decimal point
|
||||
|
||||
@ -1251,7 +1249,7 @@ class basic_json
|
||||
template <
|
||||
typename T,
|
||||
typename =
|
||||
typename std::enable_if<has_json_traits<typename std::remove_cv<
|
||||
typename std::enable_if<detail::has_json_traits<typename std::remove_cv<
|
||||
typename std::remove_reference<T>::type>::type>::value>::type>
|
||||
explicit basic_json(T &&val)
|
||||
: basic_json(json_traits<typename std::remove_cv<
|
||||
@ -2232,7 +2230,7 @@ class basic_json
|
||||
{
|
||||
std::stringstream ss;
|
||||
// fix locale problems
|
||||
const static std::locale loc(std::locale(), new DecimalSeparator);
|
||||
const static std::locale loc(std::locale(), new detail::DecimalSeparator);
|
||||
ss.imbue(loc);
|
||||
|
||||
// 6, 15 or 16 digits of precision allows round-trip IEEE 754
|
||||
@ -2618,7 +2616,7 @@ class basic_json
|
||||
template <
|
||||
typename T,
|
||||
typename =
|
||||
typename std::enable_if<has_json_traits<typename std::remove_cv<
|
||||
typename std::enable_if<detail::has_json_traits<typename std::remove_cv<
|
||||
typename std::remove_reference<T>::type>::type>::value>::type>
|
||||
auto get_impl(T *) const -> decltype(
|
||||
json_traits<typename std::remove_cv<typename std::remove_reference<
|
||||
@ -2662,7 +2660,7 @@ class basic_json
|
||||
not std::is_same<basic_json_t, typename T::value_type>::value and
|
||||
not std::is_arithmetic<T>::value and
|
||||
not std::is_convertible<std::string, T>::value and
|
||||
not has_mapped_type<T>::value, int>::type = 0>
|
||||
not detail::has_mapped_type<T>::value, int>::type = 0>
|
||||
T get_impl(T*) const
|
||||
{
|
||||
if (is_array())
|
||||
@ -2707,7 +2705,7 @@ class basic_json
|
||||
/// get an array (explicit)
|
||||
template<class T, typename std::enable_if<
|
||||
std::is_same<basic_json, typename T::value_type>::value and
|
||||
not has_mapped_type<T>::value, int>::type = 0>
|
||||
not detail::has_mapped_type<T>::value, int>::type = 0>
|
||||
T get_impl(T*) const
|
||||
{
|
||||
if (is_array())
|
||||
@ -5872,7 +5870,7 @@ class basic_json
|
||||
o.width(0);
|
||||
|
||||
// fix locale problems
|
||||
const auto old_locale = o.imbue(std::locale(std::locale(), new DecimalSeparator));
|
||||
const auto old_locale = o.imbue(std::locale(std::locale(), new detail::DecimalSeparator));
|
||||
// set precision
|
||||
|
||||
// 6, 15 or 16 digits of precision allows round-trip IEEE 754
|
||||
|
||||
Loading…
Reference in New Issue
Block a user