3

Is there any difference between bsoncxx::stdx::optional and mongocxx::stdx::optional in MongoDB C++ driver? Do they both inherit boost::optional?

I can't find descriptions about them in the MongoDB C++ Driver API Documentation.

Azeem
  • 11,148
  • 4
  • 27
  • 40
Natalie
  • 31
  • 2
  • 2
    MongoDB C++ driver is an open source project (Link: https://github.com/mongodb/mongo-cxx-driver/). You can simply look into it to find that out. Here's the `optional.hpp` where these have been defined (Link: https://github.com/mongodb/mongo-cxx-driver/blob/master/src/bsoncxx/stdx/optional.hpp ). – Azeem Aug 27 '18 at 05:56
  • Thanks a lot ! @Azeem – Natalie Aug 27 '18 at 09:26
  • You are welcome! :) – Azeem Aug 27 '18 at 09:53
  • They are the same: https://github.com/mongodb/mongo-cxx-driver/blob/master/src/mongocxx/stdx.hpp#L24 – acm Aug 27 '18 at 17:57
  • Am I seeing that right? Is `bsoncxx::stdx::optional` just an alias (in the general sense) of `std::optional` from the standard library? – jcairney Mar 27 '19 at 20:49

0 Answers0