jeudi 5 février 2015

g++ : should --std option change which STL/stdlib my code uses?

I'm confused about whether a recent g++ (say 4.8 or 4.9) should or should not refer to different STLs depending on the --std option selected. Specifically, given the option --std=c++98 vs --std=c++11, shouldn't my code see/use two different STLs in that case? Yet, when I compile with the c++98 option, it seems like I'm still getting the latest STL, which obviously does not work since it uses many things that are c++11 only. I've searched on my system and only found one copy of the STL headers (the c++11 ones). Any clarification on how this is supposed to work is appreciated.


Aucun commentaire:

Enregistrer un commentaire