Use std::initializer_list in Visual C++ Compiler November 2012 CTP

前端 未结 2 720
-上瘾入骨i
-上瘾入骨i 2021-01-12 15:53

I want to use std::initializer_lists in Visual Studio 2012 like a guy in this example does. My operating system is Windows 8 x64.

Therefore I lately ins

2条回答
  •  一整个雨季
    2021-01-12 16:47

    As you have noticed, the November CTP is very limited in usability for at least two reasons:

    1. The compiler has numerous crash-causing bugs, such as the one you discovered.

    2. The C++ Standard Library was not updated with the compiler, leaving you without decent and (this includes the omission of the braced init list constructors for all standard containers)

    Also: the linked example is very ugly code. If you want to use this feature, use a compiler like GCC or Clang that supports this syntax. They are both available for Windows. Hacking around a half-implemented language feature by writing extra code is just stupid.

提交回复
热议问题