Skip to content

Commit 7f46994

Browse files
committed
Revert explicit default constructors for list-initialization
1 parent f042ae7 commit 7f46994

File tree

1 file changed

+1
-14
lines changed
  • src/bsoncxx/include/bsoncxx/v1/document

1 file changed

+1
-14
lines changed

src/bsoncxx/include/bsoncxx/v1/document/value.hpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -163,20 +163,7 @@ class value {
163163
///
164164
/// @warning Modifying the pointed-to data after default construction is undefined behavior.
165165
///
166-
/// @note This constructor is explicit to support initialization as an empty BSON document via the @ref
167-
/// bsoncxx::v1::document::value::value(bsoncxx::v1::document::view view) constructor using list-initialization
168-
/// syntax:
169-
/// ```cpp
170-
/// bsoncxx::v1::document::value doc({});
171-
///
172-
/// auto v = doc.view();
173-
///
174-
/// assert(v); // Valid.
175-
/// assert(v.empty()); // Empty.
176-
/// assert(v.data()); // Not null.
177-
/// ```
178-
///
179-
explicit value() : _data{const_cast<std::uint8_t*>(v1::document::view{}.data()), &noop_deleter} {}
166+
value() : _data{const_cast<std::uint8_t*>(v1::document::view{}.data()), &noop_deleter} {}
180167

181168
///
182169
/// Initialize as owning `data` which will be freed with `deleter`.

0 commit comments

Comments
 (0)