Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/boost/json/value.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ class value
object&& other,
storage_ptr sp)
: obj_(
other,
detail::move(other),
detail::move(sp))
{
}
Expand Down
7 changes: 7 additions & 0 deletions test/value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,13 @@ class value_test
BOOST_TEST(jv.is_object());
BOOST_TEST(*jv.storage() == *sp);
}
{
// verify moved from
object obj{{"a", 1}, {"b", 2}};
BOOST_TEST(obj.capacity() > 0);
value jv(std::move(obj), {});
BOOST_TEST(obj.capacity() == 0);
}
}

// value(array)
Expand Down