aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorPaolo Carlini <pcarlini@suse.de>2007-11-18 18:55:27 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2007-11-18 18:55:27 +0000
commit3c279553647c683018e777eaf6e95f5140bc3425 (patch)
treefa244436dbbc997be8a54c052dd1b6045895d01c /libstdc++-v3
parent90b81c3306761f67cf192c219bccbb434bd88541 (diff)
downloadgcc-3c279553647c683018e777eaf6e95f5140bc3425.zip
gcc-3c279553647c683018e777eaf6e95f5140bc3425.tar.gz
gcc-3c279553647c683018e777eaf6e95f5140bc3425.tar.bz2
type_traits (_DEFINE_SPEC_BODY): Remove.
2007-11-18 Paolo Carlini <pcarlini@suse.de> * include/tr1/type_traits (_DEFINE_SPEC_BODY): Remove. (_DEFINE_SPEC_0_HELPER): Rename to _DEFINE_SPEC_HELPER. (_DEFINE_SPEC): Simplify; adjust uses. From-SVN: r130273
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/include/tr1/type_traits44
2 files changed, 26 insertions, 24 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index da1204d..0b65380 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,11 @@
2007-11-18 Paolo Carlini <pcarlini@suse.de>
+ * include/tr1/type_traits (_DEFINE_SPEC_BODY): Remove.
+ (_DEFINE_SPEC_0_HELPER): Rename to _DEFINE_SPEC_HELPER.
+ (_DEFINE_SPEC): Simplify; adjust uses.
+
+2007-11-18 Paolo Carlini <pcarlini@suse.de>
+
* include/tr1_impl/type_traits (is_reference, is_function,
remove_cv, is_member_pointer, remove_reference): Declare.
* include/tr1_impl/type_traitsfwd.h: Remove.
diff --git a/libstdc++-v3/include/tr1/type_traits b/libstdc++-v3/include/tr1/type_traits
index c8376ad..4533ee5 100644
--- a/libstdc++-v3/include/tr1/type_traits
+++ b/libstdc++-v3/include/tr1/type_traits
@@ -60,19 +60,16 @@ namespace std
{
namespace tr1
{
-#define _DEFINE_SPEC_BODY(_Value) \
- : public integral_constant<bool, _Value> { };
-
-#define _DEFINE_SPEC_0_HELPER(_Spec, _Value) \
- template<> \
- struct _Spec \
- _DEFINE_SPEC_BODY(_Value)
+#define _DEFINE_SPEC_HELPER(_Spec) \
+ template<> \
+ struct _Spec \
+ : public true_type { };
-#define _DEFINE_SPEC(_Order, _Trait, _Type, _Value) \
- _DEFINE_SPEC_##_Order##_HELPER(_Trait<_Type>, _Value) \
- _DEFINE_SPEC_##_Order##_HELPER(_Trait<_Type const>, _Value) \
- _DEFINE_SPEC_##_Order##_HELPER(_Trait<_Type volatile>, _Value) \
- _DEFINE_SPEC_##_Order##_HELPER(_Trait<_Type const volatile>, _Value)
+#define _DEFINE_SPEC(_Trait, _Type) \
+ _DEFINE_SPEC_HELPER(_Trait<_Type>) \
+ _DEFINE_SPEC_HELPER(_Trait<_Type const>) \
+ _DEFINE_SPEC_HELPER(_Trait<_Type volatile>) \
+ _DEFINE_SPEC_HELPER(_Trait<_Type const volatile>)
template<typename>
struct is_reference
@@ -125,20 +122,20 @@ namespace tr1
template<typename>
struct is_signed
: public false_type { };
- _DEFINE_SPEC(0, is_signed, signed char, true)
- _DEFINE_SPEC(0, is_signed, short, true)
- _DEFINE_SPEC(0, is_signed, int, true)
- _DEFINE_SPEC(0, is_signed, long, true)
- _DEFINE_SPEC(0, is_signed, long long, true)
+ _DEFINE_SPEC(is_signed, signed char)
+ _DEFINE_SPEC(is_signed, short)
+ _DEFINE_SPEC(is_signed, int)
+ _DEFINE_SPEC(is_signed, long)
+ _DEFINE_SPEC(is_signed, long long)
template<typename>
struct is_unsigned
: public false_type { };
- _DEFINE_SPEC(0, is_unsigned, unsigned char, true)
- _DEFINE_SPEC(0, is_unsigned, unsigned short, true)
- _DEFINE_SPEC(0, is_unsigned, unsigned int, true)
- _DEFINE_SPEC(0, is_unsigned, unsigned long, true)
- _DEFINE_SPEC(0, is_unsigned, unsigned long long, true)
+ _DEFINE_SPEC(is_unsigned, unsigned char)
+ _DEFINE_SPEC(is_unsigned, unsigned short)
+ _DEFINE_SPEC(is_unsigned, unsigned int)
+ _DEFINE_SPEC(is_unsigned, unsigned long)
+ _DEFINE_SPEC(is_unsigned, unsigned long long)
template<typename _Base, typename _Derived>
struct __is_base_of_helper
@@ -244,9 +241,8 @@ namespace tr1
};
};
-#undef _DEFINE_SPEC_0_HELPER
+#undef _DEFINE_SPEC_HELPER
#undef _DEFINE_SPEC
-#undef _DEFINE_SPEC_BODY
}
}