diff --git a/include/boost/json/impl/value.ipp b/include/boost/json/impl/value.ipp index 5bc39c8eb..bc3c9c99c 100644 --- a/include/boost/json/impl/value.ipp +++ b/include/boost/json/impl/value.ipp @@ -238,7 +238,6 @@ value( } else { -#ifndef BOOST_JSON_LEGACY_INIT_LIST_BEHAVIOR if( init.size() == 1 ) { ::new(&sca_) scalar(); @@ -246,7 +245,6 @@ value( swap(temp); } else -#endif { ::new(&arr_) array( value_ref::make_array( diff --git a/include/boost/json/value.hpp b/include/boost/json/value.hpp index 5268ac410..151b8e3e2 100644 --- a/include/boost/json/value.hpp +++ b/include/boost/json/value.hpp @@ -1029,20 +1029,6 @@ class value @param sp A pointer to the `boost::container::pmr::memory_resource` to use. The container will acquire shared ownership of the memory resource. - - @par Note - The previous behavior of this constructor was to always - construct either an @ref object or an @ref array. In practice though, - several C++ implementations did not treat `value{x}` as a constructor - from initializer list. This effectively resulted in different behavior - on different implementations.
- - If you need the legacy behavior define macro - `BOOST_JSON_LEGACY_INIT_LIST_BEHAVIOR` when you are building the - library. The macro and the functionality will be deprecated in the - future and then removed, so we urge you to change your code for the new - behavior as soon as possible. The simplest way to create an @ref array - with 1 element using an initializer list is via `array{x}`. */ BOOST_JSON_DECL value( diff --git a/test/value.cpp b/test/value.cpp index 11acfae06..8d230e201 100644 --- a/test/value.cpp +++ b/test/value.cpp @@ -2398,7 +2398,6 @@ class value_test BOOST_TEST(( jv6 == array{1,2} )); } { -#ifndef BOOST_JSON_LEGACY_INIT_LIST_BEHAVIOR value jv1{0}; BOOST_TEST( jv1 == 0 ); @@ -2408,7 +2407,6 @@ class value_test value jv3 = value{0}; BOOST_TEST( jv3 == 0 ); -#endif value jv4{{0}}; BOOST_TEST( jv4 == array{0} );