-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 3.0.0
-
Component/s: Implementation
When compiling on CentOS with clang 3.7.1, using the modern c++ library, i.e., using CXXFLAGS="std=c+11 -stdlib=libc+", use of options.max_time()>count() in collection.cpp and seconds.count() in modify_collection.cpp are found to be ambiguous by the compiler.
In the first case of the 4 uses of options.max_time()->count() in collection.cpp, count() is a signed integral of at least 45 bits. In the case of the single seconds.count() in modify_collection.cpp, count() is a signed integral of at least 35 bits.
Thus, it would seem that wrapping these in bsoncxx:types:b_int64 is the right thing to do, and it does in our case prevent the compiler from erroring out on the ambiguity, but we're just trying the non-legacy library for the first time, and thus aren't sure if this is an ideal approach.
- is duplicated by
-
CXX-956 Compile error with clang/libc++ on Linux due to ambiguous call to 'append' member function
- Closed