summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/include/std/type_traits
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-17 23:53:26 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-17 23:53:26 +0000
commita3ee70c2b70b4e1d423dcfab6b494536bb2e0e02 (patch)
treec3c3bbc697c8eb502283f26c846f130bab407130 /libstdc++-v3/include/std/type_traits
parent010db245e57d351bb70b49660187f8a52dc18ef2 (diff)
downloadppe42-gcc-a3ee70c2b70b4e1d423dcfab6b494536bb2e0e02.tar.gz
ppe42-gcc-a3ee70c2b70b4e1d423dcfab6b494536bb2e0e02.zip
2011-09-17 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/50441 * acinclude.m4 ([GLIBCXX_ENABLE_INT128_FLOAT128]): Add. * configure.ac: Call it. * include/std/type_traits (__is_integral_helper<__int128_t>, __is_integral_helper<__uint128_t>, __is_floating_point_helper<__float128>, __make_unsigned<__int128_t>, __make_signed<__uint128_t>): Add. * testsuite/20_util/make_signed/requirements/typedefs-1.cc: Extend. * testsuite/20_util/make_signed/requirements/typedefs-2.cc: Likewise. * testsuite/20_util/make_unsigned/requirements/typedefs-1.cc: Likewise. * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc: Likewise. * testsuite/20_util/is_signed/value.cc: Likewise. * testsuite/20_util/is_unsigned/value.cc: Likewise. * testsuite/20_util/is_integral/value.cc: Likewise. * testsuite/20_util/is_floating_point/value.cc: New. * testsuite/20_util/is_floating_point/requirements/typedefs.cc: Likewise. * testsuite/20_util/is_floating_point/requirements/ explicit_instantiation.cc: Likewise. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust dg-error line numbers. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Likewise. * testsuite/20_util/declval/requirements/1_neg.cc: Likewise. * configure: Regenerate. * config.h.in: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178933 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/std/type_traits')
-rw-r--r--libstdc++-v3/include/std/type_traits28
1 files changed, 28 insertions, 0 deletions
diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits
index 155f7dfe6b9..a03fb34e26e 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3/include/std/type_traits
@@ -213,6 +213,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct __is_integral_helper<unsigned long long>
: public true_type { };
+#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_INT128)
+ template<>
+ struct __is_integral_helper<__int128_t>
+ : public true_type { };
+
+ template<>
+ struct __is_integral_helper<__uint128_t>
+ : public true_type { };
+#endif
+
/// is_integral
template<typename _Tp>
struct is_integral
@@ -236,6 +246,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct __is_floating_point_helper<long double>
: public true_type { };
+#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128)
+ template<>
+ struct __is_floating_point_helper<__float128>
+ : public true_type { };
+#endif
+
/// is_floating_point
template<typename _Tp>
struct is_floating_point
@@ -1398,6 +1414,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct __make_unsigned<long long>
{ typedef unsigned long long __type; };
+#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_INT128)
+ template<>
+ struct __make_unsigned<__int128_t>
+ { typedef __uint128_t __type; };
+#endif
+
// Select between integral and enum: not possible to be both.
template<typename _Tp,
bool _IsInt = is_integral<_Tp>::value,
@@ -1474,6 +1496,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct __make_signed<unsigned long long>
{ typedef signed long long __type; };
+#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_INT128)
+ template<>
+ struct __make_signed<__uint128_t>
+ { typedef __int128_t __type; };
+#endif
+
// Select between integral and enum: not possible to be both.
template<typename _Tp,
bool _IsInt = is_integral<_Tp>::value,
OpenPOWER on IntegriCloud