aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <pcarlini@suse.de>2007-11-18 18:05:42 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2007-11-18 18:05:42 +0000
commit90b81c3306761f67cf192c219bccbb434bd88541 (patch)
treec7f7d284b06d9b071dc2d86b7783555602025ba1
parent129c14bd4c1b3a043bc2bb2c80b1c2030ea72713 (diff)
downloadgcc-90b81c3306761f67cf192c219bccbb434bd88541.zip
gcc-90b81c3306761f67cf192c219bccbb434bd88541.tar.gz
gcc-90b81c3306761f67cf192c219bccbb434bd88541.tar.bz2
type_traits (is_reference, [...]): Declare.
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. * include/Makefile.am: Adjust. * include/Makefile.in: Regenerate. From-SVN: r130272
-rw-r--r--libstdc++-v3/ChangeLog8
-rw-r--r--libstdc++-v3/include/Makefile.am1
-rw-r--r--libstdc++-v3/include/Makefile.in1
-rw-r--r--libstdc++-v3/include/tr1_impl/type_traits27
-rw-r--r--libstdc++-v3/include/tr1_impl/type_traitsfwd.h171
5 files changed, 28 insertions, 180 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 95fbeae..da1204d 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,11 @@
+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.
+ * include/Makefile.am: Adjust.
+ * include/Makefile.in: Regenerate.
+
2007-11-17 Jonathan Wakely <jwakely.gcc@gmail.com>
* docs/html/17_intro/howto.html, docs/html/21_strings/howto.html,
diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
index c17d04f..9eee090 100644
--- a/libstdc++-v3/include/Makefile.am
+++ b/libstdc++-v3/include/Makefile.am
@@ -594,7 +594,6 @@ tr1_impl_headers = \
${tr1_impl_srcdir}/regex \
${tr1_impl_srcdir}/tuple \
${tr1_impl_srcdir}/type_traits \
- ${tr1_impl_srcdir}/type_traitsfwd.h \
${tr1_impl_srcdir}/unordered_map \
${tr1_impl_srcdir}/unordered_set \
${tr1_impl_srcdir}/utility
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index f2e86ad..9b2fb03 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -840,7 +840,6 @@ tr1_impl_headers = \
${tr1_impl_srcdir}/regex \
${tr1_impl_srcdir}/tuple \
${tr1_impl_srcdir}/type_traits \
- ${tr1_impl_srcdir}/type_traitsfwd.h \
${tr1_impl_srcdir}/unordered_map \
${tr1_impl_srcdir}/unordered_set \
${tr1_impl_srcdir}/utility
diff --git a/libstdc++-v3/include/tr1_impl/type_traits b/libstdc++-v3/include/tr1_impl/type_traits
index 3c105d6..2a6227b 100644
--- a/libstdc++-v3/include/tr1_impl/type_traits
+++ b/libstdc++-v3/include/tr1_impl/type_traits
@@ -32,8 +32,6 @@
* You should not attempt to use it directly.
*/
-#include <tr1_impl/type_traitsfwd.h>
-
namespace std
{
_GLIBCXX_BEGIN_NAMESPACE_TR1
@@ -131,7 +129,13 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
struct is_pointer
: public false_type { };
_DEFINE_SPEC(1, is_pointer, _Tp*, true)
-
+
+ template<typename _Tp>
+ struct is_reference;
+
+ template<typename _Tp>
+ struct is_function;
+
template<typename>
struct is_member_object_pointer
: public false_type { };
@@ -172,6 +176,9 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
: public true_type { };
template<typename _Tp>
+ struct remove_cv;
+
+ template<typename _Tp>
struct is_function
: public integral_constant<bool, (__is_function_helper<typename
remove_cv<_Tp>::type>::value)>
@@ -198,6 +205,9 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
{ };
template<typename _Tp>
+ struct is_member_pointer;
+
+ template<typename _Tp>
struct is_scalar
: public integral_constant<bool, (is_arithmetic<_Tp>::value
|| is_enum<_Tp>::value
@@ -268,8 +278,8 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
template<typename _Tp>
struct rank<_Tp[]>
: public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
-
- template<typename, unsigned>
+
+ template<typename, unsigned _Uint = 0>
struct extent
: public integral_constant<std::size_t, 0> { };
@@ -286,7 +296,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
_Uint == 0 ? 0 : extent<_Tp,
_Uint - 1>::value>
{ };
-
+
/// @brief relationships between types [4.6].
template<typename, typename>
struct is_same
@@ -369,7 +379,10 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
struct remove_pointer
{ typedef _Tp type; };
_DEFINE_SPEC(1, remove_pointer, _Tp*, false)
-
+
+ template<typename _Tp>
+ struct remove_reference;
+
template<typename _Tp>
struct add_pointer
{ typedef typename remove_reference<_Tp>::type* type; };
diff --git a/libstdc++-v3/include/tr1_impl/type_traitsfwd.h b/libstdc++-v3/include/tr1_impl/type_traitsfwd.h
deleted file mode 100644
index 558f110..0000000
--- a/libstdc++-v3/include/tr1_impl/type_traitsfwd.h
+++ /dev/null
@@ -1,171 +0,0 @@
-// TR1 type_traitsfwd.h -*- C++ -*-
-
-// Copyright (C) 2007 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
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/** @file tr1_impl/type_traitsfwd.h
- * This is an internal header file, included by other library headers.
- * You should not attempt to use it directly.
- */
-
-namespace std
-{
-_GLIBCXX_BEGIN_NAMESPACE_TR1
-
- /// @brief helper classes [4.3].
- template<typename _Tp, _Tp __v>
- struct integral_constant;
- typedef integral_constant<bool, true> true_type;
- typedef integral_constant<bool, false> false_type;
-
- /// @brief primary type categories [4.5.1].
- template<typename _Tp>
- struct is_void;
-
- template<typename _Tp>
- struct is_integral;
-
- template<typename _Tp>
- struct is_floating_point;
-
- template<typename _Tp>
- struct is_array;
-
- template<typename _Tp>
- struct is_pointer;
-
- template<typename _Tp>
- struct is_reference;
-
- template<typename _Tp>
- struct is_member_object_pointer;
-
- template<typename _Tp>
- struct is_member_function_pointer;
-
- template<typename _Tp>
- struct is_enum;
-
- template<typename _Tp>
- struct is_union;
-
- template<typename _Tp>
- struct is_class;
-
- template<typename _Tp>
- struct is_function;
-
- /// @brief composite type traits [4.5.2].
- template<typename _Tp>
- struct is_arithmetic;
-
- template<typename _Tp>
- struct is_fundamental;
-
- template<typename _Tp>
- struct is_object;
-
- template<typename _Tp>
- struct is_scalar;
-
- template<typename _Tp>
- struct is_compound;
-
- template<typename _Tp>
- struct is_member_pointer;
-
- /// @brief type properties [4.5.3].
- template<typename _Tp>
- struct is_const;
-
- template<typename _Tp>
- struct is_volatile;
-
- template<typename _Tp>
- struct is_empty;
-
- template<typename _Tp>
- struct is_polymorphic;
-
- template<typename _Tp>
- struct is_abstract;
-
- template<typename _Tp>
- struct has_virtual_destructor;
-
- template<typename _Tp>
- struct alignment_of;
-
- template<typename _Tp>
- struct rank;
-
- template<typename _Tp, unsigned _Uint = 0>
- struct extent;
-
- /// @brief relationships between types [4.6].
- template<typename _Tp, typename _Up>
- struct is_same;
-
- /// @brief const-volatile modifications [4.7.1].
- template<typename _Tp>
- struct remove_const;
-
- template<typename _Tp>
- struct remove_volatile;
-
- template<typename _Tp>
- struct remove_cv;
-
- template<typename _Tp>
- struct add_const;
-
- template<typename _Tp>
- struct add_volatile;
-
- template<typename _Tp>
- struct add_cv;
-
- /// @brief reference modifications [4.7.2].
- template<typename _Tp>
- struct remove_reference;
-
- /// @brief array modifications [4.7.3].
- template<typename _Tp>
- struct remove_extent;
-
- template<typename _Tp>
- struct remove_all_extents;
-
- /// @brief pointer modifications [4.7.4].
- template<typename _Tp>
- struct remove_pointer;
-
- template<typename _Tp>
- struct add_pointer;
-
-_GLIBCXX_END_NAMESPACE_TR1
-}