In many/most of our options classes we return stdx::optional<bsoncxx::document::view_or_value> e.g. here.
Change these to return optional<view>.
The view_or_value type is intended mostly as a parameter/member type. This could easily return an optional<document::view>.
My reasoning for preferring the latter is that I don't want end users using view_or_value as a vocabulary type - it isn't for them. But returning one here encourages them to start thinking of it as something they should interact with.
Source this cr