The situation is as follows:
I want to create a simple c++ program, but it has to use only C++98 functions.
I am using Ubuntu 20.04.4 LTS.
I am using c++ as compiler
I am using the following flags for compiling:
-Wall -Werror -Wextra -std=c++98 -pedantic-errors
Now if I am using the function stoi() from <string>, compiling will fail, as expected, because stoi() is C++11, as you can see here.
But here comes the weird behavior that I am not able to understand:
using round or roundf from <cmath> won't trigger the -std=c++98 flag, even though, from what I can see here, all round functions are C++11.
Is there any good explanation why this is happening?
EDIT:
as jjramsey mentioned, there is the chance that the standard-C-function of round was used, so the -std=c++98 flag will have no effect on that.
Can anyone confirm this theory?