20 #include <bsoncxx/stdx/string_view.hpp>
22 #include <bsoncxx/config/prelude.hpp>
28 template <
class CharT,
29 class Traits = std::char_traits<CharT>,
30 class Allocator = std::allocator<CharT>>
31 BSONCXX_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};
43 using ::bsoncxx::v_noabi::string::to_string;
48 #include <bsoncxx/config/postlude.hpp>
std::string to_string(type rhs)
Returns a stringification of the given type.
The top-level namespace for bsoncxx library entities.
Definition: element-fwd.hpp:19