20 #include <bsoncxx/document/view.hpp>
22 #include <bsoncxx/config/prelude.hpp>
25 BSONCXX_INLINE_NAMESPACE_BEGIN
35 using deleter_type = void (*)(std::uint8_t*);
36 using unique_ptr_type = std::unique_ptr<uint8_t[], deleter_type>;
50 value(std::uint8_t* data, std::size_t length, deleter_type dtor);
61 value(unique_ptr_type ptr, std::size_t length);
100 unique_ptr_type release();
109 unique_ptr_type _data;
110 std::size_t _length{0};
114 return document::view{
static_cast<uint8_t*
>(_data.get()), _length};
132 BSONCXX_INLINE
bool operator!=(
const value& lhs,
const value& rhs) {
133 return !(lhs == rhs);
141 BSONCXX_INLINE_NAMESPACE_END
144 #include <bsoncxx/config/postlude.hpp>