20#include <bsoncxx/stdx/string_view.hpp>
22#include <bsoncxx/config/prelude.hpp>
25BSONCXX_INLINE_NAMESPACE_BEGIN
29 class Traits = std::char_traits<CharT>,
30 class Allocator = std::allocator<CharT>>
31BSONCXX_INLINE std::basic_string<CharT, Traits, Allocator>
to_string(
32 stdx::basic_string_view<CharT, Traits> value,
const Allocator& alloc = Allocator()) {
33 return std::basic_string<CharT, Traits, Allocator>{value.data(), value.length(), alloc};
37BSONCXX_INLINE_NAMESPACE_END
40#include <bsoncxx/config/postlude.hpp>
Top level namespace for MongoDB C++ BSON functionality.
Definition: element.hpp:24
std::string to_string(type rhs)
Returns a stringification of the given type.