Uniform initializer used in default argument to const reference

后端 未结 1 779
终归单人心
终归单人心 2021-01-19 02:32

Is this legal c++0x syntax?

class A
{
public:
    void some_function( const std::set &options = {} );
    // note that this is legal,          


        
相关标签:
1条回答
  • 2021-01-19 02:56

    It is valid in C++11, but it was a very late addition to the working paper that Bjarne put through. So it's not surprising that GCC doesn't support brace default arguments yet.

    0 讨论(0)
提交回复
热议问题