Currently, to create an owning bson_value::value, users must first construct a bsoncxx::document::value, then parse out the bson_value they are interested in:
This is not an ideal workflow. To avoid it, we will need to provide a way for users to construct bson_value::value directly. We should not utilize the b_type structs for this, because those structs are inherently non-owning, and would require a copy for us to use them to implement these constructors. Instead, we should consider exposing a series of bson_value::value constructors that take the component members for each b_type.
For example, something like:
With such constructors the workflow would be simpler and more straightforward: