diff options
Diffstat (limited to 'gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/requirements')
7 files changed, 173 insertions, 0 deletions
diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/requirements/dr438/constructor.cc b/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/requirements/dr438/constructor.cc new file mode 100644 index 000000000..49ea816c4 --- /dev/null +++ b/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/requirements/dr438/constructor.cc @@ -0,0 +1,27 @@ +// 2007-04-27 Paolo Carlini <pcarlini@suse.de> + +// Copyright (C) 2007, 2009 Free Software Foundation +// +// 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 3, 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 COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +// { dg-do compile } + +#include <string> + +void f() +{ + std::string s(10, 1); +} diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/1.cc b/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/1.cc new file mode 100644 index 000000000..11e4138f0 --- /dev/null +++ b/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/1.cc @@ -0,0 +1,27 @@ +// Copyright (C) 2005, 2009 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 3, 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 COPYING3. If not see +// <http://www.gnu.org/licenses/>. + + +// This file tests explicit instantiation of basic_string + +#include <string> + +// { dg-do compile } + +// libstdc++/21770 +template class std::basic_string<int, std::char_traits<int>, + std::allocator<char> >; diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/char/1.cc b/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/char/1.cc new file mode 100644 index 000000000..759548bae --- /dev/null +++ b/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/char/1.cc @@ -0,0 +1,22 @@ +// { dg-do compile } + +// Copyright (C) 2008, 2009 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 3, 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 COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <string> + +template class std::basic_string<char>; diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/char16_t/1.cc b/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/char16_t/1.cc new file mode 100644 index 000000000..f89a26786 --- /dev/null +++ b/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/char16_t/1.cc @@ -0,0 +1,24 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } +// { dg-require-cstdint "" } + +// Copyright (C) 2008, 2009 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 3, 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 COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <string> + +template class std::basic_string<char16_t>; diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/char32_t/1.cc b/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/char32_t/1.cc new file mode 100644 index 000000000..0fdbe3c49 --- /dev/null +++ b/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/char32_t/1.cc @@ -0,0 +1,24 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } +// { dg-require-cstdint "" } + +// Copyright (C) 2008, 2009 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 3, 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 COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <string> + +template class std::basic_string<char32_t>; diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/debug.cc b/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/debug.cc new file mode 100644 index 000000000..c9bbbd773 --- /dev/null +++ b/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/debug.cc @@ -0,0 +1,27 @@ +// Copyright (C) 2005, 2006, 2009 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 3, 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 COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +// This file tests explicit instantiation of basic_string + +#include <debug/string> + +// { dg-do compile } + +// libstdc++/21770 +namespace debug = __gnu_debug; +template class debug::basic_string<int, std::char_traits<int>, + std::allocator<char> >; diff --git a/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/wchar_t/1.cc b/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/wchar_t/1.cc new file mode 100644 index 000000000..3137f3f70 --- /dev/null +++ b/gcc-4.4.3/libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/wchar_t/1.cc @@ -0,0 +1,22 @@ +// { dg-do compile } + +// Copyright (C) 2008, 2009 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 3, 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 COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <string> + +template class std::basic_string<wchar_t>; |