Commit 11436beb by Paolo Carlini Committed by Paolo Carlini

propagation_consistent.cc: Fix vs POD-ness of value_type.

2011-05-20  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/21_strings/basic_string/requirements/exception/
	propagation_consistent.cc: Fix vs POD-ness of value_type.
	* testsuite/21_strings/basic_string/requirements/exception/
	basic.cc: Likewise.
	* testsuite/ext/vstring/requirements/exception/
	propagation_consistent.cc: Likewise.
	* testsuite/ext/vstring/requirements/exception/basic.cc: Likewise.

From-SVN: r173992
parent cab84112
2011-05-20 Paolo Carlini <paolo.carlini@oracle.com> 2011-05-20 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/21_strings/basic_string/requirements/exception/
propagation_consistent.cc: Fix vs POD-ness of value_type.
* testsuite/21_strings/basic_string/requirements/exception/
basic.cc: Likewise.
* testsuite/ext/vstring/requirements/exception/
propagation_consistent.cc: Likewise.
* testsuite/ext/vstring/requirements/exception/basic.cc: Likewise.
2011-05-20 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/char_traits.h: Use noexcept throughout. * include/bits/char_traits.h: Use noexcept throughout.
* include/std/typeindex: Likewise. * include/std/typeindex: Likewise.
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// 2009-11-10 Benjamin Kosnik <benjamin@redhat.com> // 2009-11-10 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 Free Software Foundation, Inc. // Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -26,7 +26,9 @@ ...@@ -26,7 +26,9 @@
void void
value() value()
{ {
typedef __gnu_cxx::throw_value_limit value_type; // NB: Instantiating with __gnu_cxx::throw_value_limit would be illegal,
// isn't a POD type.
typedef char value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type; typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::char_traits<value_type> traits_type; typedef std::char_traits<value_type> traits_type;
typedef std::basic_string<value_type, traits_type, allocator_type> test_type; typedef std::basic_string<value_type, traits_type, allocator_type> test_type;
......
// { dg-options "-std=gnu++0x" } // { dg-options "-std=gnu++0x" }
// { dg-require-cstdint "" } // { dg-require-cstdint "" }
// { dg-do run { xfail *-*-* } }
// 2009-09-14 Benjamin Kosnik <benjamin@redhat.com> // 2009-09-14 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 Free Software Foundation, Inc. // Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -27,7 +26,9 @@ ...@@ -27,7 +26,9 @@
void void
value() value()
{ {
typedef __gnu_cxx::throw_value_limit value_type; // NB: Instantiating with __gnu_cxx::throw_value_limit would be illegal,
// isn't a POD type.
typedef char value_type;
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type; typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::char_traits<value_type> traits_type; typedef std::char_traits<value_type> traits_type;
typedef std::basic_string<value_type, traits_type, allocator_type> test_type; typedef std::basic_string<value_type, traits_type, allocator_type> test_type;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// 2009-11-10 Benjamin Kosnik <benjamin@redhat.com> // 2009-11-10 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 Free Software Foundation, Inc. // Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -26,14 +26,9 @@ ...@@ -26,14 +26,9 @@
void void
value() value()
{ {
#if 1 // NB: Instantiating with __gnu_cxx::throw_value_limit would be illegal,
// isn't a POD type.
typedef char value_type; typedef char value_type;
#else
// XXX
// __gnu_cxx::__rc_string_base<>::_Rep::_M_align’ with constructor
// not allowed in union
// typedef __gnu_cxx::throw_value_limit value_type;
#endif
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type; typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::char_traits<value_type> traits_type; typedef std::char_traits<value_type> traits_type;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// 2009-09-14 Benjamin Kosnik <benjamin@redhat.com> // 2009-09-14 Benjamin Kosnik <benjamin@redhat.com>
// Copyright (C) 2009 Free Software Foundation, Inc. // Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -26,14 +26,9 @@ ...@@ -26,14 +26,9 @@
void void
value() value()
{ {
#if 1 // NB: Instantiating with __gnu_cxx::throw_value_limit would be illegal,
// isn't a POD type.
typedef char value_type; typedef char value_type;
#else
// XXX
// __gnu_cxx::__rc_string_base<>::_Rep::_M_align’ with constructor
// not allowed in union
// typedef __gnu_cxx::throw_value_limit value_type;
#endif
typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type; typedef __gnu_cxx::throw_allocator_limit<value_type> allocator_type;
typedef std::char_traits<value_type> traits_type; typedef std::char_traits<value_type> traits_type;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment