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

Conflict with <windows.h>. Different include order lead to different result.

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.3.1
    • Component/s: Documentation
    • Environment:
      OS: windows 10
      compiler: visual studio 2017

       

      #include <mongocxx/client.hpp>
      #include <windows.h>
      int main() {
          return 0;
      }
      

       This can complie success.

      #include <windows.h>
      #include <mongocxx/client.hpp>
      int main() {
          return 0;
      }
      

      This cause strange error.
      Error (active) E0145 member "bsoncxx::v_noabi::types::b_double::type_id" may not be initialized.

        1. buildOutput.txt
          27 kB
        2. CMakeLists.txt
          0.9 kB
        3. main.cpp
          0.1 kB

            Assignee:
            Unassigned Unassigned
            Reporter:
            drinkmystery drink
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: