summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/21_strings/headers
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/testsuite/21_strings/headers')
-rw-r--r--libstdc++-v3/testsuite/21_strings/headers/cctype/functions_std.cc37
-rw-r--r--libstdc++-v3/testsuite/21_strings/headers/cstdlib/functions_std.cc36
-rw-r--r--libstdc++-v3/testsuite/21_strings/headers/cstdlib/macros.cc27
-rw-r--r--libstdc++-v3/testsuite/21_strings/headers/cstring/functions_std.cc46
-rw-r--r--libstdc++-v3/testsuite/21_strings/headers/cstring/macros.cc27
-rw-r--r--libstdc++-v3/testsuite/21_strings/headers/cstring/types_std.cc25
-rw-r--r--libstdc++-v3/testsuite/21_strings/headers/cwchar/functions_std.cc78
-rw-r--r--libstdc++-v3/testsuite/21_strings/headers/cwchar/macros.cc43
-rw-r--r--libstdc++-v3/testsuite/21_strings/headers/cwchar/types_std.cc28
-rw-r--r--libstdc++-v3/testsuite/21_strings/headers/cwctype/functions_std.cc40
-rw-r--r--libstdc++-v3/testsuite/21_strings/headers/cwctype/macros.cc31
-rw-r--r--libstdc++-v3/testsuite/21_strings/headers/cwctype/types_std.cc28
-rw-r--r--libstdc++-v3/testsuite/21_strings/headers/string/synopsis.cc134
-rw-r--r--libstdc++-v3/testsuite/21_strings/headers/string/types_std.cc27
-rw-r--r--libstdc++-v3/testsuite/21_strings/headers/string/types_std_c++0x.cc28
15 files changed, 635 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/21_strings/headers/cctype/functions_std.cc b/libstdc++-v3/testsuite/21_strings/headers/cctype/functions_std.cc
new file mode 100644
index 000000000..09db60345
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/headers/cctype/functions_std.cc
@@ -0,0 +1,37 @@
+// { dg-do compile }
+
+// Copyright (C) 2007, 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 <cctype>
+
+namespace gnu
+{
+ using std::isalnum;
+ using std::isdigit;
+ using std::isprint;
+ using std::isupper;
+ using std::tolower;
+ using std::isalpha;
+ using std::isgraph;
+ using std::ispunct;
+ using std::isxdigit;
+ using std::toupper;
+ using std::iscntrl;
+ using std::islower;
+ using std::isspace;
+}
diff --git a/libstdc++-v3/testsuite/21_strings/headers/cstdlib/functions_std.cc b/libstdc++-v3/testsuite/21_strings/headers/cstdlib/functions_std.cc
new file mode 100644
index 000000000..240049c5e
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/headers/cstdlib/functions_std.cc
@@ -0,0 +1,36 @@
+// { dg-do compile }
+// { dg-require-c-std "" }
+
+// Copyright (C) 2007, 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 <cstdlib>
+
+namespace gnu
+{
+ using std::atol;
+ using std::atof;
+ using std::atoi;
+ using std::mblen;
+ using std::mbstowcs;
+ using std::mbtowc;
+ using std::strtod;
+ using std::strtol;
+ using std::strtoul;
+ using std::wctomb;
+ using std::wcstombs;
+}
diff --git a/libstdc++-v3/testsuite/21_strings/headers/cstdlib/macros.cc b/libstdc++-v3/testsuite/21_strings/headers/cstdlib/macros.cc
new file mode 100644
index 000000000..d85767dd5
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/headers/cstdlib/macros.cc
@@ -0,0 +1,27 @@
+// { dg-do compile }
+
+// Copyright (C) 2007, 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 <cstring>
+
+namespace gnu
+{
+#ifndef NULL
+ #error "NULL_must_be_a_macro"
+#endif
+}
diff --git a/libstdc++-v3/testsuite/21_strings/headers/cstring/functions_std.cc b/libstdc++-v3/testsuite/21_strings/headers/cstring/functions_std.cc
new file mode 100644
index 000000000..d5b2a42e5
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/headers/cstring/functions_std.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+
+// Copyright (C) 2007, 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 <cstring>
+
+namespace gnu
+{
+ using std::memchr;
+ using std::memcmp;
+ using std::memcpy;
+ using std::memmove;
+ using std::memset;
+ using std::strcat;
+ using std::strchr;
+ using std::strcmp;
+ using std::strcoll;
+ using std::strcpy;
+ using std::strcspn;
+ using std::strerror;
+ using std::strlen;
+ using std::strncat;
+ using std::strncmp;
+ using std::strncpy;
+ using std::strpbrk;
+ using std::strrchr;
+ using std::strspn;
+ using std::strstr;
+ using std::strtok;
+ using std::strxfrm;
+}
diff --git a/libstdc++-v3/testsuite/21_strings/headers/cstring/macros.cc b/libstdc++-v3/testsuite/21_strings/headers/cstring/macros.cc
new file mode 100644
index 000000000..d85767dd5
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/headers/cstring/macros.cc
@@ -0,0 +1,27 @@
+// { dg-do compile }
+
+// Copyright (C) 2007, 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 <cstring>
+
+namespace gnu
+{
+#ifndef NULL
+ #error "NULL_must_be_a_macro"
+#endif
+}
diff --git a/libstdc++-v3/testsuite/21_strings/headers/cstring/types_std.cc b/libstdc++-v3/testsuite/21_strings/headers/cstring/types_std.cc
new file mode 100644
index 000000000..306d2547b
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/headers/cstring/types_std.cc
@@ -0,0 +1,25 @@
+// { dg-do compile }
+
+// Copyright (C) 2007, 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 <cstring>
+
+namespace gnu
+{
+ std::size_t s;
+}
diff --git a/libstdc++-v3/testsuite/21_strings/headers/cwchar/functions_std.cc b/libstdc++-v3/testsuite/21_strings/headers/cwchar/functions_std.cc
new file mode 100644
index 000000000..e1de06d99
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/headers/cwchar/functions_std.cc
@@ -0,0 +1,78 @@
+// { dg-do compile }
+// { dg-require-c-std "" }
+// { dg-require-swprintf "" }
+
+// Copyright (C) 2007, 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 <cwchar>
+
+namespace gnu
+{
+ using std::btowc;
+ using std::fgetwc;
+ using std::fgetws;
+ using std::fputwc;
+ using std::fputws;
+ using std::fwide;
+ using std::fwprintf;
+ using std::fwscanf;
+ using std::getwc;
+ using std::getwchar;
+ using std::mbrlen;
+ using std::mbrtowc;
+ using std::mbsinit;
+ using std::mbsrtowcs;
+ using std::putwc;
+ using std::putwchar;
+ using std::swprintf;
+ using std::swscanf;
+ using std::ungetwc;
+ using std::vfwprintf;
+ using std::vswprintf;
+ using std::vwprintf;
+ using std::wcrtomb;
+ using std::wcscat;
+ using std::wcschr;
+ using std::wcscmp;
+ using std::wcscoll;
+ using std::wcscpy;
+ using std::wcscmp;
+ using std::wcsftime;
+ using std::wcslen;
+ using std::wcsncat;
+ using std::wcsncmp;
+ using std::wcsncpy;
+ using std::wcspbrk;
+ using std::wcsrchr;
+ using std::wcsrtombs;
+ using std::wcsspn;
+ using std::wcsstr;
+ using std::wcstod;
+ using std::wcstok;
+ using std::wcstol;
+ using std::wcstoul;
+ using std::wcsxfrm;
+ using std::wctob;
+ using std::wmemchr;
+ using std::wmemcmp;
+ using std::wmemcpy;
+ using std::wmemmove;
+ using std::wmemset;
+ using std::wprintf;
+ using std::wscanf;
+}
diff --git a/libstdc++-v3/testsuite/21_strings/headers/cwchar/macros.cc b/libstdc++-v3/testsuite/21_strings/headers/cwchar/macros.cc
new file mode 100644
index 000000000..951776007
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/headers/cwchar/macros.cc
@@ -0,0 +1,43 @@
+// { dg-do compile }
+
+// Copyright (C) 2007, 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 <cwchar>
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+
+namespace gnu
+{
+#ifndef NULL
+ #error "NULL_must_be_a_macro"
+#endif
+
+#ifndef WCHAR_MAX
+ #error "WCHAR_MAX_must_be_a_macro"
+#endif
+
+#ifndef WCHAR_MIN
+ #error "WCHAR_MIN_must_be_a_macro"
+#endif
+
+#ifndef WEOF
+ #error "WEOF_must_be_a_macro"
+#endif
+}
+
+#endif
diff --git a/libstdc++-v3/testsuite/21_strings/headers/cwchar/types_std.cc b/libstdc++-v3/testsuite/21_strings/headers/cwchar/types_std.cc
new file mode 100644
index 000000000..993c85ff6
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/headers/cwchar/types_std.cc
@@ -0,0 +1,28 @@
+// { dg-do compile }
+// { dg-require-c-std "" }
+
+// Copyright (C) 2007, 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 <cwchar>
+
+namespace gnu
+{
+ std::mbstate_t mb;
+ std::wint_t wt;
+ std::size_t s;
+}
diff --git a/libstdc++-v3/testsuite/21_strings/headers/cwctype/functions_std.cc b/libstdc++-v3/testsuite/21_strings/headers/cwctype/functions_std.cc
new file mode 100644
index 000000000..ece5e585e
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/headers/cwctype/functions_std.cc
@@ -0,0 +1,40 @@
+// { dg-do compile }
+// { dg-require-c-std "" }
+
+// Copyright (C) 2007, 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 <cwctype>
+
+namespace gnu
+{
+ using std::iswalnum;
+ using std::iswdigit;
+ using std::iswprint;
+ using std::iswupper;
+ using std::iswalpha;
+ using std::iswgraph;
+ using std::iswpunct;
+ using std::iswxdigit;
+ using std::iswspace;
+ using std::iswcntrl;
+ using std::towlower;
+ using std::towupper;
+ using std::towctrans;
+ using std::wctrans;
+ using std::wctype;
+}
diff --git a/libstdc++-v3/testsuite/21_strings/headers/cwctype/macros.cc b/libstdc++-v3/testsuite/21_strings/headers/cwctype/macros.cc
new file mode 100644
index 000000000..151b8b74a
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/headers/cwctype/macros.cc
@@ -0,0 +1,31 @@
+// { dg-do compile }
+
+// Copyright (C) 2007, 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 <cwctype>
+
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
+
+namespace gnu
+{
+#ifndef WEOF
+ #error "WEOF_must_be_a_macro"
+#endif
+}
+
+#endif
diff --git a/libstdc++-v3/testsuite/21_strings/headers/cwctype/types_std.cc b/libstdc++-v3/testsuite/21_strings/headers/cwctype/types_std.cc
new file mode 100644
index 000000000..45825d218
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/headers/cwctype/types_std.cc
@@ -0,0 +1,28 @@
+// { dg-do compile }
+// { dg-require-c-std "" }
+
+// Copyright (C) 2007, 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 <cwctype>
+
+namespace gnu
+{
+ std::wctrans_t wt;
+ std::wctype_t wct;
+ std::wint_t wint;
+}
diff --git a/libstdc++-v3/testsuite/21_strings/headers/string/synopsis.cc b/libstdc++-v3/testsuite/21_strings/headers/string/synopsis.cc
new file mode 100644
index 000000000..686a3117f
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/headers/string/synopsis.cc
@@ -0,0 +1,134 @@
+// { dg-do compile }
+
+// Copyright (C) 2007, 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>
+
+namespace std {
+ // lib.char.traits, character traits:
+ template<class charT>
+ struct char_traits;
+ template <> struct char_traits<char>;
+ template <> struct char_traits<wchar_t>;
+
+ // lib.basic.string, basic_string:
+ template<class charT, class traits, class Allocator >
+ class basic_string;
+
+ template<class charT, class traits, class Allocator>
+ basic_string<charT,traits,Allocator>
+ operator+(const basic_string<charT,traits,Allocator>& lhs,
+ const basic_string<charT,traits,Allocator>& rhs);
+ template<class charT, class traits, class Allocator>
+ basic_string<charT,traits,Allocator>
+ operator+(const charT* lhs,
+ const basic_string<charT,traits,Allocator>& rhs);
+ template<class charT, class traits, class Allocator>
+ basic_string<charT,traits,Allocator>
+ operator+(charT lhs, const basic_string<charT,traits,Allocator>& rhs);
+ template<class charT, class traits, class Allocator>
+ basic_string<charT,traits,Allocator>
+ operator+(const basic_string<charT,traits,Allocator>& lhs,
+ const charT* rhs);
+ template<class charT, class traits, class Allocator>
+ basic_string<charT,traits,Allocator>
+ operator+(const basic_string<charT,traits,Allocator>& lhs, charT rhs);
+
+ template<class charT, class traits, class Allocator>
+ bool operator==(const basic_string<charT,traits,Allocator>& lhs,
+ const basic_string<charT,traits,Allocator>& rhs);
+ template<class charT, class traits, class Allocator>
+ bool operator==(const charT* lhs,
+ const basic_string<charT,traits,Allocator>& rhs);
+ template<class charT, class traits, class Allocator>
+ bool operator==(const basic_string<charT,traits,Allocator>& lhs,
+ const charT* rhs);
+ template<class charT, class traits, class Allocator>
+ bool operator!=(const basic_string<charT,traits,Allocator>& lhs,
+ const basic_string<charT,traits,Allocator>& rhs);
+ template<class charT, class traits, class Allocator>
+ bool operator!=(const charT* lhs,
+ const basic_string<charT,traits,Allocator>& rhs);
+ template<class charT, class traits, class Allocator>
+ bool operator!=(const basic_string<charT,traits,Allocator>& lhs,
+ const charT* rhs);
+
+ template<class charT, class traits, class Allocator>
+ bool operator< (const basic_string<charT,traits,Allocator>& lhs,
+ const basic_string<charT,traits,Allocator>& rhs);
+ template<class charT, class traits, class Allocator>
+ bool operator< (const basic_string<charT,traits,Allocator>& lhs,
+ const charT* rhs);
+ template<class charT, class traits, class Allocator>
+ bool operator< (const charT* lhs,
+ const basic_string<charT,traits,Allocator>& rhs);
+ template<class charT, class traits, class Allocator>
+ bool operator> (const basic_string<charT,traits,Allocator>& lhs,
+ const basic_string<charT,traits,Allocator>& rhs);
+ template<class charT, class traits, class Allocator>
+ bool operator> (const basic_string<charT,traits,Allocator>& lhs,
+ const charT* rhs);
+ template<class charT, class traits, class Allocator>
+ bool operator> (const charT* lhs,
+ const basic_string<charT,traits,Allocator>& rhs);
+
+ template<class charT, class traits, class Allocator>
+ bool operator<=(const basic_string<charT,traits,Allocator>& lhs,
+ const basic_string<charT,traits,Allocator>& rhs);
+ template<class charT, class traits, class Allocator>
+ bool operator<=(const basic_string<charT,traits,Allocator>& lhs,
+ const charT* rhs);
+ template<class charT, class traits, class Allocator>
+ bool operator<=(const charT* lhs,
+ const basic_string<charT,traits,Allocator>& rhs);
+ template<class charT, class traits, class Allocator>
+ bool operator>=(const basic_string<charT,traits,Allocator>& lhs,
+ const basic_string<charT,traits,Allocator>& rhs);
+ template<class charT, class traits, class Allocator>
+ bool operator>=(const basic_string<charT,traits,Allocator>& lhs,
+ const charT* rhs);
+ template<class charT, class traits, class Allocator>
+ bool operator>=(const charT* lhs,
+ const basic_string<charT,traits,Allocator>& rhs);
+
+ // lib.string.special:
+ template<class charT, class traits, class Allocator>
+ void swap(basic_string<charT,traits,Allocator>& lhs,
+ basic_string<charT,traits,Allocator>& rhs);
+
+ template<class charT, class traits, class Allocator>
+ basic_istream<charT,traits>&
+ operator>>(basic_istream<charT,traits>& is,
+ basic_string<charT,traits,Allocator>& str);
+ template<class charT, class traits, class Allocator>
+ basic_ostream<charT, traits>&
+ operator<<(basic_ostream<charT, traits>& os,
+ const basic_string<charT,traits,Allocator>& str);
+ template<class charT, class traits, class Allocator>
+ basic_istream<charT,traits>&
+ getline(basic_istream<charT,traits>& is,
+ basic_string<charT,traits,Allocator>& str,
+ charT delim);
+ template<class charT, class traits, class Allocator>
+ basic_istream<charT,traits>&
+ getline(basic_istream<charT,traits>& is,
+ basic_string<charT,traits,Allocator>& str);
+
+ typedef basic_string<char> string;
+ typedef basic_string<wchar_t> wstring;
+}
diff --git a/libstdc++-v3/testsuite/21_strings/headers/string/types_std.cc b/libstdc++-v3/testsuite/21_strings/headers/string/types_std.cc
new file mode 100644
index 000000000..b403b3e5d
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/headers/string/types_std.cc
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-require-c-std "" }
+
+// Copyright (C) 2007, 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>
+
+namespace gnu
+{
+ typedef std::string t1;
+ typedef std::wstring t2;
+}
diff --git a/libstdc++-v3/testsuite/21_strings/headers/string/types_std_c++0x.cc b/libstdc++-v3/testsuite/21_strings/headers/string/types_std_c++0x.cc
new file mode 100644
index 000000000..63e934831
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/headers/string/types_std_c++0x.cc
@@ -0,0 +1,28 @@
+// { 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>
+
+namespace gnu
+{
+ typedef std::u16string t3;
+ typedef std::u32string t4;
+}