为什么`std :: unary_function`仍然在c 17中编译?
std::unary_function特性在c 11中已弃用,在c 17中已删除.但是使用c 17编译器标志,此代码仍会编译:
struct less_than_7 : std::unary_function<int, bool>
{
bool operator()(int i) const { return i < 7; }
};
使用g -std = c 17 -O0 -Wall -pedantic main.cpp here.构建
功能删除是否可选,以便编译器实现?