From patchwork Fri Dec 3 20:38:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: c++0x tests fixes Date: Fri, 03 Dec 2010 10:38:22 -0000 From: =?utf-8?q?Fran=C3=A7ois_Dumont?= X-Patchwork-Id: 74209 Message-Id: <4CF9553E.5010706@free.fr> To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Attached patch applied (yesterday) Regards 2010-12-02 François Dumont * testsuite/23_containers/vector/requirements/explicit_instantiation/ 2.cc: Hide explicit instantiation with non default constructible type in C++0x mode. * testsuite/23_containers/deque/requirements/explicit_instantiation/ 2.cc: Likewise * testsuite/23_containers/list/requirements/explicit_instantiation/ 2.cc: Likewise. Index: testsuite/23_containers/vector/requirements/explicit_instantiation/2.cc =================================================================== --- testsuite/23_containers/vector/requirements/explicit_instantiation/2.cc (revision 167353) +++ testsuite/23_containers/vector/requirements/explicit_instantiation/2.cc (working copy) @@ -19,9 +19,12 @@ // This file tests explicit instantiation of library containers #include -#include #include // { dg-do compile } +// N.B. In C++0x mode we cannot instantiate with T == NonDefaultConstructible +// because of 23.4.1.1.4 +#ifndef __GXX_EXPERIMENTAL_CXX0X__ template class std::vector<__gnu_test::NonDefaultConstructible>; +#endif Index: testsuite/23_containers/deque/requirements/explicit_instantiation/2.cc =================================================================== --- testsuite/23_containers/deque/requirements/explicit_instantiation/2.cc (revision 167353) +++ testsuite/23_containers/deque/requirements/explicit_instantiation/2.cc (working copy) @@ -19,9 +19,12 @@ // This file tests explicit instantiation of library containers #include -#include #include // { dg-do compile } +// N.B. In C++0x mode we cannot instantiate with T == NonDefaultConstructible +// because of 23.3.2.1.4 +#ifndef __GXX_EXPERIMENTAL_CXX0X__ template class std::deque<__gnu_test::NonDefaultConstructible>; +#endif Index: testsuite/23_containers/list/requirements/explicit_instantiation/2.cc =================================================================== --- testsuite/23_containers/list/requirements/explicit_instantiation/2.cc (revision 167353) +++ testsuite/23_containers/list/requirements/explicit_instantiation/2.cc (working copy) @@ -19,9 +19,12 @@ // This file tests explicit instantiation of library containers #include -#include #include // { dg-do compile } +// N.B. In C++0x mode we cannot instantiate with T == NonDefaultConstructible +// because of 23.3.4.1.4 +#ifndef __GXX_EXPERIMENTAL_CXX0X__ template class std::list<__gnu_test::NonDefaultConstructible>; +#endif