LLVM&Clang support of C++11

后端 未结 2 768
别跟我提以往
别跟我提以往 2021-02-10 17:37

I have some code written by me for MS VC++10. I use C++11 and, in particular, expressions like

std::function f =...;
auto it = v.begin();
for_e         


        
2条回答
  •  自闭症患者
    2021-02-10 18:17

    For a list of C++11 features Clang currently supports, see this nice list. Lambda expressions (and syntactically related initialzer lists) are currently not implemented.

    Your only choice for now (until Clang devs implement lambda support) is using MacPorts' GCC 4.5/4.6 compilers.

    The extra command-line option would be -std=c++0x (in the next version of Clang and GCC it will be the proper -std=c++11).

提交回复
热议问题