diff --git a/include/boost/json/array.hpp b/include/boost/json/array.hpp index 644bbdd96..016cc48ba 100644 --- a/include/boost/json/array.hpp +++ b/include/boost/json/array.hpp @@ -182,7 +182,7 @@ class array @li **(5)** the array is filled with values in the range `[first, last)`, preserving order. - @li **(6)** the array is filled with copies of the values in `init, + @li **(6)** the array is filled with copies of the values in `init`, preserving order. @li **(7)**, **(8)** the array is filled with copies of the elements of @@ -237,7 +237,6 @@ class array @see @ref pilfer, [Valueless Variants Considered Harmful](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0308r0.html). - // @{ */ array() noexcept @@ -318,14 +317,6 @@ class array array const& other, storage_ptr sp); - /// Overload - array(pilfered other) noexcept - : sp_(std::move(other.get().sp_)) - , t_(detail::exchange( - other.get().t_, &empty_)) - { - } - /// Overload array(array&& other) noexcept : sp_(other.sp_) @@ -339,6 +330,14 @@ class array array( array&& other, storage_ptr sp); + + /// Overload + array(pilfered other) noexcept + : sp_(std::move(other.get().sp_)) + , t_(detail::exchange( + other.get().t_, &empty_)) + { + } /// @} /** Assignment operators.