diff options
author | Jason Merrill <jason@redhat.com> | 2010-10-27 17:43:33 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-10-27 17:43:33 -0400 |
commit | 2b08f2c561e0dc9b8f569a00868a6b7eb2ba111b (patch) | |
tree | f2bb18bbab464000b24772c45a3ad35f319b284b /libstdc++-v3 | |
parent | 81f0bab25ec7d17b84e94ee7322aa953a75584a7 (diff) | |
download | gcc-2b08f2c561e0dc9b8f569a00868a6b7eb2ba111b.zip gcc-2b08f2c561e0dc9b8f569a00868a6b7eb2ba111b.tar.gz gcc-2b08f2c561e0dc9b8f569a00868a6b7eb2ba111b.tar.bz2 |
c-common.c (c_common_reswords): Add __is_literal_type.
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.
From-SVN: r166020
Diffstat (limited to 'libstdc++-v3')
5 files changed, 18 insertions, 5 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 14e0b9f..05bfcbd 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 cde741e..a5a62d6 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 f0c6546..b18ff2f 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 8a09c65..d74f4e63 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 ba68414..18fd4fb 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 } |