Why does GCC allow use of round() in C++ even with the ansi and pedantic flags?

前端 未结 3 504
温柔的废话
温柔的废话 2021-01-18 11:28

Is there a good reason why this program compiles under GCC even with the -ansi and -pedantic flags?

#include 

int mai         


        
3条回答
  •  离开以前
    2021-01-18 12:06

    I believe that the Standards specify what symbols are required to be defined and in which header they are defined. I do not believe that the Standards state that no other symbols may be defined. More to the point, std::round() will not be defined by a free symbol called round() can be defined.

提交回复
热议问题