Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-717

Add C++ compile-time standard detection

      The driver crashes badly if the library is linked to code not compiled with the same C++ standard level. For instance, if the driver is compiled with C++98 (still the default on GCC 5), but some code using it with C++11, the driver will crash.

      The header could be extended to detect this at run-time. For example, version.h.in could contain a macro to specify the C++ version used during compilation. Then, another macro evaluated on inclusion verifies that this version matches the currently used standard. If not, in #error can be thrown.

            Assignee:
            david.golden@mongodb.com David Golden
            Reporter:
            timn Tim Niemueller
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: