diff --git a/libstdc++-v3/include/debug/debug.h b/libstdc++-v3/include/debug/debug.h index d3cdfbc044c..28e250f0c50 100644 --- a/libstdc++-v3/include/debug/debug.h +++ b/libstdc++-v3/include/debug/debug.h @@ -118,9 +118,10 @@ namespace __gnu_debug __glibcxx_check_heap(_First,_Last) # define __glibcxx_requires_heap_pred(_First,_Last,_Pred) \ __glibcxx_check_heap_pred(_First,_Last,_Pred) -# define __glibcxx_requires_string(_String) __glibcxx_check_string(_String) +# define __glibcxx_requires_string(_String) \ + _GLIBCXX_DEBUG_PEDASSERT(_String != 0) # define __glibcxx_requires_string_len(_String,_Len) \ - __glibcxx_check_string_len(_String,_Len) + _GLIBCXX_DEBUG_PEDASSERT(_String != 0 || _Len == 0) # define __glibcxx_requires_irreflexive(_First,_Last) \ __glibcxx_check_irreflexive(_First,_Last) # define __glibcxx_requires_irreflexive2(_First,_Last) \ diff --git a/libstdc++-v3/include/debug/macros.h b/libstdc++-v3/include/debug/macros.h index 7b86292d1ef..5fb68324ab2 100644 --- a/libstdc++-v3/include/debug/macros.h +++ b/libstdc++-v3/include/debug/macros.h @@ -467,8 +467,4 @@ _GLIBCXX_DEBUG_VERIFY(_This.get_allocator() == _Other.get_allocator(), \ _M_message(__gnu_debug::__msg_equal_allocs) \ ._M_sequence(_This, "this")) -#define __glibcxx_check_string(_String) _GLIBCXX_DEBUG_PEDASSERT(_String != 0) -#define __glibcxx_check_string_len(_String,_Len) \ - _GLIBCXX_DEBUG_PEDASSERT(_String != 0 || _Len == 0) - #endif diff --git a/libstdc++-v3/include/debug/string b/libstdc++-v3/include/debug/string index 3ec55d42d66..a4482db4af5 100644 --- a/libstdc++-v3/include/debug/string +++ b/libstdc++-v3/include/debug/string @@ -49,6 +49,20 @@ # define _GLIBCXX_INSERT_RETURNS_ITERATOR_ONLY(expr) #endif +#ifdef _GLIBCXX_DEBUG_PEDANTIC +# define __glibcxx_check_string(_String) \ + _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(_String != 0, \ + __FILE__, __LINE__, \ + __PRETTY_FUNCTION__); +# define __glibcxx_check_string_len(_String,_Len) \ + _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(_String != 0 || _Len == 0, \ + __FILE__, __LINE__, \ + __PRETTY_FUNCTION__); +#else +# define __glibcxx_check_string(_String) +# define __glibcxx_check_string_len(_String,_Len) +#endif + namespace __gnu_debug { /** Checks that __s is non-NULL or __n == 0, and then returns __s. */ @@ -868,34 +882,28 @@ namespace __gnu_debug using _Base::get_allocator; - size_type - find(const basic_string& __str, size_type __pos = 0) const - _GLIBCXX_NOEXCEPT - { return _Base::find(__str, __pos); } + using _Base::find; + _GLIBCXX20_CONSTEXPR size_type find(const _CharT* __s, size_type __pos, size_type __n) const + _GLIBCXX_NOEXCEPT { __glibcxx_check_string(__s); return _Base::find(__s, __pos, __n); } + _GLIBCXX20_CONSTEXPR size_type - find(const _CharT* __s, size_type __pos = 0) const + find(const _CharT* __s, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { __glibcxx_check_string(__s); return _Base::find(__s, __pos); } - size_type - find(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT - { return _Base::find(__c, __pos); } - - size_type - rfind(const basic_string& __str, size_type __pos = _Base::npos) const - _GLIBCXX_NOEXCEPT - { return _Base::rfind(__str, __pos); } + using _Base::rfind; + _GLIBCXX20_CONSTEXPR size_type rfind(const _CharT* __s, size_type __pos, size_type __n) const { @@ -903,6 +911,7 @@ namespace __gnu_debug return _Base::rfind(__s, __pos, __n); } + _GLIBCXX20_CONSTEXPR size_type rfind(const _CharT* __s, size_type __pos = _Base::npos) const { @@ -910,105 +919,85 @@ namespace __gnu_debug return _Base::rfind(__s, __pos); } - size_type - rfind(_CharT __c, size_type __pos = _Base::npos) const _GLIBCXX_NOEXCEPT - { return _Base::rfind(__c, __pos); } - - size_type - find_first_of(const basic_string& __str, size_type __pos = 0) const - _GLIBCXX_NOEXCEPT - { return _Base::find_first_of(__str, __pos); } + using _Base::find_first_of; + _GLIBCXX20_CONSTEXPR size_type find_first_of(const _CharT* __s, size_type __pos, size_type __n) const + _GLIBCXX_NOEXCEPT { __glibcxx_check_string(__s); return _Base::find_first_of(__s, __pos, __n); } + _GLIBCXX20_CONSTEXPR size_type - find_first_of(const _CharT* __s, size_type __pos = 0) const + find_first_of(const _CharT* __s, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { __glibcxx_check_string(__s); return _Base::find_first_of(__s, __pos); } - size_type - find_first_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT - { return _Base::find_first_of(__c, __pos); } - - size_type - find_last_of(const basic_string& __str, - size_type __pos = _Base::npos) const _GLIBCXX_NOEXCEPT - { return _Base::find_last_of(__str, __pos); } + using _Base::find_last_of; + _GLIBCXX20_CONSTEXPR size_type find_last_of(const _CharT* __s, size_type __pos, size_type __n) const + _GLIBCXX_NOEXCEPT { __glibcxx_check_string(__s); return _Base::find_last_of(__s, __pos, __n); } + _GLIBCXX20_CONSTEXPR size_type find_last_of(const _CharT* __s, size_type __pos = _Base::npos) const + _GLIBCXX_NOEXCEPT { __glibcxx_check_string(__s); return _Base::find_last_of(__s, __pos); } - size_type - find_last_of(_CharT __c, size_type __pos = _Base::npos) const - _GLIBCXX_NOEXCEPT - { return _Base::find_last_of(__c, __pos); } - - size_type - find_first_not_of(const basic_string& __str, size_type __pos = 0) const - _GLIBCXX_NOEXCEPT - { return _Base::find_first_not_of(__str, __pos); } + using _Base::find_first_not_of; + _GLIBCXX20_CONSTEXPR size_type find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const + _GLIBCXX_NOEXCEPT { __glibcxx_check_string_len(__s, __n); return _Base::find_first_not_of(__s, __pos, __n); } + _GLIBCXX20_CONSTEXPR size_type find_first_not_of(const _CharT* __s, size_type __pos = 0) const + _GLIBCXX_NOEXCEPT { __glibcxx_check_string(__s); return _Base::find_first_not_of(__s, __pos); } - size_type - find_first_not_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT - { return _Base::find_first_not_of(__c, __pos); } - - size_type - find_last_not_of(const basic_string& __str, - size_type __pos = _Base::npos) const - _GLIBCXX_NOEXCEPT - { return _Base::find_last_not_of(__str, __pos); } + using _Base::find_last_not_of; + _GLIBCXX20_CONSTEXPR size_type find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const + _GLIBCXX_NOEXCEPT { __glibcxx_check_string(__s); return _Base::find_last_not_of(__s, __pos, __n); } + _GLIBCXX20_CONSTEXPR size_type find_last_not_of(const _CharT* __s, size_type __pos = _Base::npos) const + _GLIBCXX_NOEXCEPT { __glibcxx_check_string(__s); return _Base::find_last_not_of(__s, __pos); } - size_type - find_last_not_of(_CharT __c, size_type __pos = _Base::npos) const - _GLIBCXX_NOEXCEPT - { return _Base::find_last_not_of(__c, __pos); } - basic_string substr(size_type __pos = 0, size_type __n = _Base::npos) const { return basic_string(_Base::substr(__pos, __n)); } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/debug/find1_neg.cc b/libstdc++-v3/testsuite/21_strings/basic_string/debug/find1_neg.cc new file mode 100644 index 00000000000..02babbc59e0 --- /dev/null +++ b/libstdc++-v3/testsuite/21_strings/basic_string/debug/find1_neg.cc @@ -0,0 +1,35 @@ +// Copyright (C) 2022 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 +// . +// +// { dg-do run { xfail *-*-* } } + +#define _GLIBCXX_DEBUG_PEDANTIC + +#include + +void test01() +{ + const char* __null_str = 0; + __gnu_debug::string str; + str.find(__null_str); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/debug/find2_neg.cc b/libstdc++-v3/testsuite/21_strings/basic_string/debug/find2_neg.cc new file mode 100644 index 00000000000..89250e2d874 --- /dev/null +++ b/libstdc++-v3/testsuite/21_strings/basic_string/debug/find2_neg.cc @@ -0,0 +1,35 @@ +// Copyright (C) 2022 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 +// . +// +// { dg-do run { xfail *-*-* } } + +#define _GLIBCXX_DEBUG_PEDANTIC + +#include + +void test01() +{ + const char* __null_str = 0; + __gnu_debug::string str; + str.find(__null_str, 0, 0); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/1.cc index e76473d88c0..862cfefee69 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/1.cc @@ -19,22 +19,22 @@ // 21.3.6.1 basic_string find -#include +#include #include void test01(void) { - typedef std::string::size_type csize_type; - typedef std::string::const_reference cref; - typedef std::string::reference ref; - csize_type npos = std::string::npos; + typedef __gnu_test::string::size_type csize_type; + typedef __gnu_test::string::const_reference cref; + typedef __gnu_test::string::reference ref; + csize_type npos = __gnu_test::string::npos; csize_type csz01, csz02; const char str_lit01[] = "mave"; - const std::string str01("mavericks, santa cruz"); - std::string str02(str_lit01); - std::string str03("s, s"); - std::string str04; + const __gnu_test::string str01("mavericks, santa cruz"); + __gnu_test::string str02(str_lit01); + __gnu_test::string str03("s, s"); + __gnu_test::string str04; // size_type find(const string&, size_type pos = 0) const; csz01 = str01.find(str01); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/2.cc index baeab8b933f..756ad85dcaa 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/2.cc @@ -19,23 +19,23 @@ // 21.3.6.3 basic_string find_first_of -#include +#include #include void test02(void) { - typedef std::string::size_type csize_type; - csize_type npos = std::string::npos; + typedef __gnu_test::string::size_type csize_type; + csize_type npos = __gnu_test::string::npos; csize_type csz01, csz02; const char str_lit01[] = "mave"; - const std::string str01("mavericks, santa cruz"); - std::string str02(str_lit01); - std::string str03("s, s"); - std::string str04; + const __gnu_test::string str01("mavericks, santa cruz"); + __gnu_test::string str02(str_lit01); + __gnu_test::string str03("s, s"); + __gnu_test::string str04; // size_type find_first_of(const string&, size_type pos = 0) const; - std::string str05("xena rulez"); + __gnu_test::string str05("xena rulez"); csz01 = str01.find_first_of(str01); VERIFY( csz01 == 0 ); csz01 = str01.find_first_of(str01, 4); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/3.cc index 7c21080c5ff..8386ae8264d 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/3.cc @@ -19,20 +19,20 @@ // 21.3.6.5 basic_string find_first_not_of -#include +#include #include void test03(void) { - typedef std::string::size_type csize_type; - csize_type npos = std::string::npos; + typedef __gnu_test::string::size_type csize_type; + csize_type npos = __gnu_test::string::npos; csize_type csz01; - const std::string str01("Bob Rock, per me"); + const __gnu_test::string str01("Bob Rock, per me"); const char str_lit01[] = "Bob Rock"; - std::string str02("ovvero Trivi"); - std::string str03(str_lit01); - std::string str04; + __gnu_test::string str02("ovvero Trivi"); + __gnu_test::string str03(str_lit01); + __gnu_test::string str04; // size_type find_first_not_of(const string&, size_type pos = 0) const; csz01 = str01.find_first_not_of(str01); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/4.cc index cf8c0c9f36d..72965d0731f 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/4.cc @@ -19,16 +19,16 @@ // 21.3.6.1 basic_string find -#include +#include #include // libstdc++/31401 void test01() { - typedef std::string::size_type csize_type; - csize_type npos = std::string::npos; + typedef __gnu_test::string::size_type csize_type; + csize_type npos = __gnu_test::string::npos; - std::string use = "anu"; + __gnu_test::string use = "anu"; csize_type pos1 = use.find("a", npos); VERIFY( pos1 == npos ); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/5.cc index 7464a3cb97f..a366975308c 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/5.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/5.cc @@ -24,14 +24,14 @@ // [string::find.first.not.of] // [string::find.last.not.of] -#include +#include #include void test03() { std::string_view str1("bar"); - std::string str2("foobar"); + __gnu_test::string str2("foobar"); auto x = str2.find(str1); VERIFY (x == 3); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/6.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/6.cc index b901e7d049f..51d7b25c1c6 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/6.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/6.cc @@ -19,13 +19,13 @@ // C++11 21.4.7.2 [string::find] basic_string find -#include +#include #include // https://gcc.gnu.org/ml/libstdc++/2017-01/msg00021.html void test01() { - typedef std::string string_type; + typedef __gnu_test::string string_type; string_type::size_type npos = string_type::npos; string_type use = "aaa"; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/1.cc index f1f554895ee..bb65c0cd15f 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/1.cc @@ -19,22 +19,22 @@ // 21.3.6.1 basic_string find -#include +#include #include void test01(void) { - typedef std::wstring::size_type csize_type; - typedef std::wstring::const_reference cref; - typedef std::wstring::reference ref; - csize_type npos = std::wstring::npos; + typedef __gnu_test::wstring::size_type csize_type; + typedef __gnu_test::wstring::const_reference cref; + typedef __gnu_test::wstring::reference ref; + csize_type npos = __gnu_test::wstring::npos; csize_type csz01, csz02; const wchar_t str_lit01[] = L"mave"; - const std::wstring str01(L"mavericks, santa cruz"); - std::wstring str02(str_lit01); - std::wstring str03(L"s, s"); - std::wstring str04; + const __gnu_test::wstring str01(L"mavericks, santa cruz"); + __gnu_test::wstring str02(str_lit01); + __gnu_test::wstring str03(L"s, s"); + __gnu_test::wstring str04; // size_type find(const wstring&, size_type pos = 0) const; csz01 = str01.find(str01); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/2.cc index e7ab9e8ca20..0bd1533d32e 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/2.cc @@ -19,23 +19,23 @@ // 21.3.6.3 basic_string find_first_of -#include +#include #include void test02(void) { - typedef std::wstring::size_type csize_type; - csize_type npos = std::wstring::npos; + typedef __gnu_test::wstring::size_type csize_type; + csize_type npos = __gnu_test::wstring::npos; csize_type csz01, csz02; const wchar_t str_lit01[] = L"mave"; - const std::wstring str01(L"mavericks, santa cruz"); - std::wstring str02(str_lit01); - std::wstring str03(L"s, s"); - std::wstring str04; + const __gnu_test::wstring str01(L"mavericks, santa cruz"); + __gnu_test::wstring str02(str_lit01); + __gnu_test::wstring str03(L"s, s"); + __gnu_test::wstring str04; // size_type find_first_of(const wstring&, size_type pos = 0) const; - std::wstring str05(L"xena rulez"); + __gnu_test::wstring str05(L"xena rulez"); csz01 = str01.find_first_of(str01); VERIFY( csz01 == 0 ); csz01 = str01.find_first_of(str01, 4); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/3.cc index 9daf26bf4f4..8c595fda3f9 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/3.cc @@ -19,20 +19,20 @@ // 21.3.6.5 basic_string find_first_not_of -#include +#include #include void test03(void) { - typedef std::wstring::size_type csize_type; - csize_type npos = std::wstring::npos; + typedef __gnu_test::wstring::size_type csize_type; + csize_type npos = __gnu_test::wstring::npos; csize_type csz01; - const std::wstring str01(L"Bob Rock, per me"); + const __gnu_test::wstring str01(L"Bob Rock, per me"); const wchar_t str_lit01[] = L"Bob Rock"; - std::wstring str02(L"ovvero Trivi"); - std::wstring str03(str_lit01); - std::wstring str04; + __gnu_test::wstring str02(L"ovvero Trivi"); + __gnu_test::wstring str03(str_lit01); + __gnu_test::wstring str04; // size_type find_first_not_of(const string&, size_type pos = 0) const; csz01 = str01.find_first_not_of(str01); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/4.cc index f9b9605212a..98c3a18accd 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/4.cc @@ -19,16 +19,16 @@ // 21.3.6.1 basic_string find -#include +#include #include // libstdc++/31401 void test01() { - typedef std::wstring::size_type csize_type; - csize_type npos = std::wstring::npos; + typedef __gnu_test::wstring::size_type csize_type; + csize_type npos = __gnu_test::wstring::npos; - std::wstring use = L"anu"; + __gnu_test::wstring use = L"anu"; csize_type pos1 = use.find(L"a", npos); VERIFY( pos1 == npos ); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc index d04e6138956..76126a79988 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc @@ -24,14 +24,14 @@ // [string::find.first.not.of] // [string::find.last.not.of] -#include +#include #include void test03() { std::wstring_view str1(L"bar"); - std::wstring str2(L"foobar"); + __gnu_test::wstring str2(L"foobar"); auto x = str2.find(str1); VERIFY (x == 3); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/6.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/6.cc index 24a8c8178fe..58c4db05163 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/6.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/6.cc @@ -19,13 +19,13 @@ // C++11 21.4.7.2 [string::find] basic_string find -#include +#include #include // https://gcc.gnu.org/ml/libstdc++/2017-01/msg00021.html void test01() { - typedef std::wstring string_type; + typedef __gnu_test::wstring string_type; string_type::size_type npos = string_type::npos; string_type use = L"aaa"; diff --git a/libstdc++-v3/testsuite/util/testsuite_string.h b/libstdc++-v3/testsuite/util/testsuite_string.h new file mode 100644 index 00000000000..7121ff8ec6d --- /dev/null +++ b/libstdc++-v3/testsuite/util/testsuite_string.h @@ -0,0 +1,20 @@ +#ifndef _GLIBCXX_TESTSUITE_STRING_H +#define _GLIBCXX_TESTSUITE_STRING_H + +#ifdef _GLIBCXX_DEBUG +# include +namespace __gnu_test +{ + using __gnu_debug::string; + using __gnu_debug::wstring; +} +#else +# include +namespace __gnu_test +{ + using std::string; + using std::wstring; +} +#endif + +#endif