[cfe-dev] New C++0x feature support in Clang
Douglas Gregor
dgregor at apple.com
Fri Feb 4 11:38:29 PST 2011
On Feb 4, 2011, at 11:33 AM, Larry Evans wrote:
> On 01/26/11 15:45, Douglas Gregor wrote:
>> Clang has recently gotten much-improved support for the upcoming C++0x standard. In particular, top-of-tree Clang now supports a number of C++0x features:
>>
>> - Rvalue references (including rvalue references for *this)
>> - Variadic templates
>> - Inline namespaces
>> - Late-specified return types
>> - Decltype
>>
>> You can turn on C++0x support with the -std=gnu++0x (or, if you want to be more pedantic, -std=c++0x).
>>
>> Give it a spin, write some tests, try it out with libc++, and tell us how it went! And if you get the itch to hack on Clang, there are a ton of other little C++0x features that you could implement.
>>
>> Cheers,
>> Doug
>
> 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.
- Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110204/d7d21a2e/attachment.html>
More information about the cfe-dev
mailing list