From 627a008abff2fa946d47e37bebf56af1f19b656b Mon Sep 17 00:00:00 2001 From: bkoz Date: Fri, 2 Mar 2012 05:54:24 +0000 Subject: [PATCH] 2012-03-01 Michael Spertus * include/tr2/type_traits (typelist): To __reflection_typelist. (first, rest, empty): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184773 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/include/tr2/type_traits | 32 ++++++++++---------------------- 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 7e6afa7632f..112ac3d170f 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2012-03-01 Michael Spertus + + * include/tr2/type_traits (typelist): To __reflection_typelist. + (first, rest, empty): Remove. + 2012-03-01 Benjamin Kosnik * testsuite/Makefile.am (CLEANFILES): Add *.gdb. diff --git a/libstdc++-v3/include/tr2/type_traits b/libstdc++-v3/include/tr2/type_traits index 9c301b30a01..eb8c012d589 100644 --- a/libstdc++-v3/include/tr2/type_traits +++ b/libstdc++-v3/include/tr2/type_traits @@ -1,6 +1,6 @@ // TR2 -*- C++ -*- -// Copyright (C) 2011 Free Software Foundation, Inc. +// Copyright (C) 2011, 2012 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -53,60 +53,48 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Simple typelist. Compile-time list of types. */ template - struct typelist; + struct __reflection_typelist; /// Specialization for an empty typelist. template<> - struct typelist<> + struct __reflection_typelist<> { - typedef std::true_type empty; + typedef std::true_type empty; }; /// Partial specialization. template - struct typelist<_First, _Rest...> + struct __reflection_typelist<_First, _Rest...> { - typedef std::false_type empty; + typedef std::false_type empty; struct first { - typedef _First type; + typedef _First type; }; struct rest { - typedef typelist<_Rest...> type; + typedef __reflection_typelist<_Rest...> type; }; }; /// Sequence abstraction metafunctions for manipulating a typelist. - /// Return the first type in a typelist. - template - struct first : public _Tp::first { }; - - /// Return the typelist minus the first type. - template - struct rest : public _Tp::rest { }; - - /// Query to see if a typelist is empty. - template - struct empty : public _Tp::empty { }; - /// Enumerate all the base classes of a class. Form of a typelist. template struct bases { - typedef typelist<__bases(_Tp)...> type; + typedef __reflection_typelist<__bases(_Tp)...> type; }; /// Enumerate all the direct base classes of a class. Form of a typelist. template struct direct_bases { - typedef typelist<__direct_bases(_Tp)...> type; + typedef __reflection_typelist<__direct_bases(_Tp)...> type; }; /// @} group metaprogramming -- 2.11.0