[v2,2/2] libstdc++: use new built-in trait __is_unsigned
Commit Message
This patch lets libstdc++ use new built-in trait __is_unsigned.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_unsigned): Use __is_unsigned built-in
trait.
---
libstdc++-v3/include/std/type_traits | 7 +++++++
1 file changed, 7 insertions(+)
@@ -884,10 +884,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ };
/// is_unsigned
+#if __has_builtin(__is_unsigned)
+ template<typename _Tp>
+ struct is_unsigned
+ : public __bool_constant<__is_unsigned(_Tp)>
+ { };
+#else
template<typename _Tp>
struct is_unsigned
: public __and_<is_arithmetic<_Tp>, __not_<is_signed<_Tp>>>::type
{ };
+#endif
/// @cond undocumented
template<typename _Tp, typename _Up = _Tp&&>