Using gcc-6.2 with -std=c++03 switch leads to compile errors
Edward Diener
eldlistmailingz@tropicsoft.com
Fri Dec 16 10:04:00 GMT 2016
I am testing gcc-6.2 with the -std=c++03 switch against some Boost C++
code in a library which does not require c++11 on up support. Without
going into the exact code I am seeing a compiler error along the lines of:
some_path/some_header_file.hpp:224:20: error: no matching function for
call to 'std::pair<int&, std::__cxx11::basic_string<char>&>::pair(int&,
std::__cxx11::basic_string<char>&)'
This implies that even when the -std=c++03 switch with gcc-6.2 c++11
constructs are being internally used. Testing the exact same code with
the -std=c++11 switch or with the -std=c++14 switch there are no errors.
Does this mean that using gcc-6.2 with -std=c++03 does not work with
gcc-6.2, or is there something other compiler switch I must use along
with the -std=c++03 switch to be able to compile using gcc-6.2 in c++03
mode ?
More information about the Gcc-help
mailing list