Why isn't std::initializer_list a language built-in?

前端 未结 6 2198
再見小時候
再見小時候 2020-12-12 15:39

Why isn\'t std::initializer_list a core-language built-in?

It seems to me that it\'s quite an important feature of C++11 and yet it doesn\'t have its

6条回答
  •  Happy的楠姐
    2020-12-12 16:40

    It's not part of the core language because it can be implemented entirely in the library, just line operator new and operator delete. What advantage would there be in making compilers more complicated to build it in?

提交回复
热议问题