What breaking changes are introduced in C++11?

后端 未结 9 1797
陌清茗
陌清茗 2020-11-22 14:34

I know that at least one of the changes in C++11 that will cause some old code to stop compiling: the introduction of explicit operator bool() in the standard l

9条回答
  •  日久生厌
    2020-11-22 15:29

    struct x {
       x(int) {}
    };
    
    void f(auto x = 3) { }
    
    int main() {
       f();
    }
    

    C++03: valid.

    C++0x: error: parameter declared 'auto'

提交回复
热议问题