mercredi 4 octobre 2017

Clang compiles code using std::stoi in c++98 mode

I need to compile my cpp in C++98, not C++11 for my school project. So i used -std=c++98 to compile:

CPPFLAGS = -Wall -Werror -Wextra -std=c++98

but i made a mistake and use std::stoi a C++11 function.

i = std::stoi(index);

I tried without the -std=c+=98 flags but didn't change anything. I am working on MAC 10.12.6

My code compile without any warning or any error.

If i am not mistaken clang should shout at me for using a C++11 function. Why?

Aucun commentaire:

Enregistrer un commentaire