Fix Bug when build without c++11 #212
Conversation
remove warning make compile success use cmake
|
Thanks for your effort. However, is there any place that do not support C++11? I was thinking about adding C++11 parameter to CMake, then we can build caffe via both Cmake and Makefile in Linux. |
|
Some Linux Server like centos ,readhat linux ,gcc version is 4.8 ,which is not support c++11 。 even gcc 4.9 have bug on c++11 compile please check modify ,we use #if __cplusplus < 201103L Micro make compatibility |
|
Oh, I am not familiar with linux. In my mind, gcc 4.8 also support c++11... |
|
GCC 4.81 has a full support for C++11. |
|
Using such macros makes codes harder to read. If we can build the code using most of the compilers, I think there is no need to get compatible with lower versions. Other libraries such as tensorflow and mxnet all need c++11 or even c++14. Maybe a good solution is to add the c++11 option in CMakeList.txt. |
|
GCC 4.81 is the first version support C++ 11 ,it has a lot of bugs ,do not use C++11 before GCC 5.0,it may case application crash . such as https://stackoverflow.com/questions/20594782/strange-behavior-with-c11-thread-in-gcc-4-8-1 it is a good idea to add C++11 option in CMakeList.txt. but until now , it is better to support no C++11 version . |
|
I add this patch for project MTCNN_face_detection_alignment ,I have made CMakeList.txt for that project. if you do not like this modify ,please just reject this . I will not supply patch again . Thanks |
Fix Bug when build without c++11