summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-27 21:43:33 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-27 21:43:33 +0000
commit5290e253566fa886ab7c826c06665c98f3f0e36d (patch)
treef2bb18bbab464000b24772c45a3ad35f319b284b /libstdc++-v3
parentb5fa273e8b78bfc07a666f41589d8db7198e599f (diff)
downloadgcc-5290e253566fa886ab7c826c06665c98f3f0e36d.tar.gz
gcc/c-family/
* c-common.c (c_common_reswords): Add __is_literal_type. * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE. gcc/cp/ * cp-tree.h (cp_trait_kind): Add CPTK_IS_LITERAL_TYPE. * cxx-pretty-print.c (pp_cxx_trait_expression): Handle it. * semantics.c (trait_expr_value, finish_trait_expr): Likewise. * parser.c (cp_parser_primary_expression): Handle RID_IS_LITERAL_TYPE. (cp_parser_trait_expr): Likewise. libstdc++-v3/ * include/std/type_traits (is_literal_type): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166020 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog7
-rw-r--r--libstdc++-v3/include/std/type_traits6
-rw-r--r--libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc4
5 files changed, 18 insertions, 5 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 14e0b9f2f92..05bfcbdf27c 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,10 @@
+2010-10-27 Jason Merrill <jason@redhat.com>
+
+ * include/std/type_traits (is_literal_type): New.
+ * testsuite/20_util/declval/requirements/1_neg.cc: Adjust.
+ * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust.
+ * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust.
+
2010-10-26 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp ([check_v3_target_normal_mode]): Add.
diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits
index cde741eb43a..a5a62d609eb 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3/include/std/type_traits
@@ -192,6 +192,12 @@ namespace std
: public integral_constant<bool, __is_pod(_Tp)>
{ };
+ /// is_literal_type
+ template<typename _Tp>
+ struct is_literal_type
+ : public integral_constant<bool, __is_literal_type(_Tp)>
+ { };
+
template<typename _Tp>
typename add_rvalue_reference<_Tp>::type declval() noexcept;
diff --git a/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc b/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
index f0c65468909..b18ff2f2a59 100644
--- a/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
@@ -19,7 +19,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-error "static assertion failed" "" { target *-*-* } 682 }
+// { dg-error "static assertion failed" "" { target *-*-* } 688 }
#include <utility>
diff --git a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
index 8a09c65d84b..d74f4e6351e 100644
--- a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
@@ -48,5 +48,5 @@ void test01()
// { dg-error "instantiated from here" "" { target *-*-* } 40 }
// { dg-error "instantiated from here" "" { target *-*-* } 42 }
-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 645 }
-// { dg-error "declaration of" "" { target *-*-* } 609 }
+// { dg-error "invalid use of incomplete type" "" { target *-*-* } 651 }
+// { dg-error "declaration of" "" { target *-*-* } 615 }
diff --git a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
index ba684144fc7..18fd4fbb72f 100644
--- a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
@@ -48,5 +48,5 @@ void test01()
// { dg-error "instantiated from here" "" { target *-*-* } 40 }
// { dg-error "instantiated from here" "" { target *-*-* } 42 }
-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 568 }
-// { dg-error "declaration of" "" { target *-*-* } 532 }
+// { dg-error "invalid use of incomplete type" "" { target *-*-* } 574 }
+// { dg-error "declaration of" "" { target *-*-* } 538 }