-
Type:
Bug
-
Resolution: Won't Fix
-
Priority:
Trivial - P5
-
None
-
Affects Version/s: None
-
Component/s: Build
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Not sure what the policy is for reporting issues on the in-progress (master) branch, but...
According to gnu, max_align_t wasn't added to std namespace until gcc 4.9.x. (Reference: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56019)
Removing std namespace on max_align_t allows it to compile again in my Centos7 VM.
Note, this doesn't seem to be an issue for Mac OS X 10.10.4 with Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn).
Thanks!
Reference:
[ 91%] Building CXX object src/mongocxx/test/CMakeFiles/test_driver.dir/pool.cpp.o
/home/ocruz/mongodb/mongo-cxx-driver/src/mongocxx/test/pool.cpp: In function ‘void ____C_A_T_C_H____T_E_S_T____127()’:
/home/ocruz/mongodb/mongo-cxx-driver/src/mongocxx/test/pool.cpp:130:5: error: ‘max_align_t’ is not a member of ‘std’
std::max_align_t dummy_address;
^
/home/ocruz/mongodb/mongo-cxx-driver/src/mongocxx/test/pool.cpp:130:5: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/cstddef:42:0,
from /home/ocruz/mongodb/mongo-cxx-driver/src/third_party/catch/include/catch.hpp:785,
from /home/ocruz/mongodb/mongo-cxx-driver/src/mongocxx/test/pool.cpp:15:
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/stddef.h:425:3: note: ‘max_align_t’
} max_align_t;
^
/home/ocruz/mongodb/mongo-cxx-driver/src/mongocxx/test/pool.cpp:130:22: error: expected ‘;’ before ‘dummy_address’
std::max_align_t dummy_address;
^
/home/ocruz/mongodb/mongo-cxx-driver/src/mongocxx/test/pool.cpp:133:65: error: ‘dummy_address’ was not declared in this scope
mongoc_client_t* fake = reinterpret_cast<mongoc_client_t*>(&dummy_address);
^
make[2]: *** [src/mongocxx/test/CMakeFiles/test_driver.dir/pool.cpp.o] Error 1
make[1]: *** [src/mongocxx/test/CMakeFiles/test_driver.dir/all] Error 2
make: *** [all] Error 2