[libcxx] Use __decltype instead of __typeof__
authorEric Fiselier <eric@efcs.ca>
Sat, 13 Jun 2015 06:27:17 +0000 (06:27 +0000)
committerEric Fiselier <eric@efcs.ca>
Sat, 13 Jun 2015 06:27:17 +0000 (06:27 +0000)
commitf8177546272a1919798f24d0fa46002175e3af6f
treeb8b3953bf0f7309cb964f4dbdfab1aec1902011f
parent104ad064df78d047008b0079aed419d1bfd8aa8a
[libcxx] Use __decltype instead of __typeof__

Summary:
Both clang and GCC provide C++11 decltype semantics as __decltype in c++03 mode. We should use this instead of __typeof__ when availble.

GCC added __decltype in 4.6.0, and AFAIK clang provided __decltype ever since 3.3. Unfortunately `__has_builtin(__decltype)` doesn't work for clang so we need to check the compiler version instead.

Reviewers: mclow.lists

Reviewed By: mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D10426

llvm-svn: 239662
libcxx/include/__config