[cfe-dev] New C++0x feature support in Clang

Óscar Fuentes ofv at wanadoo.es
Fri Feb 4 12:28:00 PST 2011

Larry Evans <cppljevans at suddenlink.net> writes:

>>> How do I get the attached to compile without the
>>> following error about no std::move?
>>> /home/evansl/download/llvm/svn/build/Debug+Asserts/bin/clang++ -c
>>> -std=c++0x -U__GXX_EXPERIMENTAL_CXX0X__ -c -std=c++0x move.cpp
>>> move.cpp:6:16: error: no member named 'move' in namespace 'std'
>>>    int j=std::move(i);
>>>          ~~~~~^
>> I suggest following the preprocessor logic to see what std::move isn't
>> getting defined. That -U__GXX_EXPERIMENTAL_CXX0X__ looks really, really
>> suspicious, though.
> The -U is there because, without it, the errors begin with:

-U__GXX_EXPERIMENTAL_CXX0X__ is for disabling C++0X features on
libstdc++. std::move is a C++0X feature.


> I did read your earlier post with the remark:
>   We *should* have enough C++0x support to handle GCC 4.3 and 4.4's
>   headers. >= 4.5 headers will still cause problems due to their use of
>   generalized initializer lists.

Seems that clang++ still needs some work to be bug-compatible with g++.


More information about the cfe-dev mailing list