I have got a strange error with a very simple code :
#include <tr1/memory>
int main(){
return 0 ;
}
The error is :
command-line:0:5: error: expected ']' before numeric constant
/sources/main.cpp:5:1: error: expected identifier at end of input
}
^
/sources/main.cpp:5:1: error: expected unqualified-id at end of input
/sources/main.cpp:5:1: error: expected '}' at end of input
I had made the test without "#include <tr1/memory>" and it works just fine. As I need it later, I wonder how I can do.
Since it is now 2017, why don't you leave behind the old C++0x TR1 in favor of the standard version? If you do not have support, it is time to update your compiler.
this is only an example for better compatibility to compile code.
i said can be compile that code without any extra compiler flag.
but your suggestion is good thanks mbozzi.
These problems are very common and I recommend detecting them as quick as possible. You can help from programs like checkmarx or others but it's always recommended to try and it on your own.
Good luck!
Ben.