mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-24 00:59:38 +08:00
libstdc++: testsuite: work around bitset namespace pollution
rtems6 declares a global struct bitset in a header file included indirectly by sys/types.h, that ambiguates the unqualified references to bitset after "using namespace std" in the testsuite. Work around the namespace pollution with using declarations of std::bitset. for libstdc++-v3/ChangeLog * testsuite/23_containers/bitset/cons/dr1325-2.cc: Work around global struct bitset. * testsuite/23_containers/bitset/ext/15361.cc: Likewise. * testsuite/23_containers/bitset/input/1.cc: Likewise. * testsuite/23_containers/bitset/to_string/1.cc: Likewise. * testsuite/23_containers/bitset/to_string/dr396.cc: Likewise.
This commit is contained in:
parent
7a1790ac6b
commit
345d69a7de
@ -39,6 +39,7 @@ template<std::size_t Nb, typename CharT>
|
||||
void test01()
|
||||
{
|
||||
using namespace std;
|
||||
using std::bitset; // Work around struct ::bitset on rtems.
|
||||
|
||||
const char s1[4] = { '0', '1', '0', '1' };
|
||||
VERIFY( bitset<4>(s1, 4) == test01_ref<4>(s1, 4) );
|
||||
|
@ -22,6 +22,7 @@
|
||||
void test01()
|
||||
{
|
||||
using namespace std;
|
||||
using std::bitset; // Work around struct ::bitset on rtems.
|
||||
|
||||
bitset<256> b;
|
||||
b.set(225);
|
||||
|
@ -26,6 +26,7 @@
|
||||
void test01()
|
||||
{
|
||||
using namespace std;
|
||||
using std::bitset; // Work around struct ::bitset on rtems.
|
||||
|
||||
bitset<5> b5;
|
||||
bitset<0> b0;
|
||||
|
@ -25,6 +25,7 @@
|
||||
void test01()
|
||||
{
|
||||
using namespace std;
|
||||
using std::bitset; // Work around struct ::bitset on rtems.
|
||||
|
||||
bitset<5> b5;
|
||||
string s0 = b5.to_string<char, char_traits<char>, allocator<char> >();
|
||||
|
@ -26,6 +26,7 @@
|
||||
void test01()
|
||||
{
|
||||
using namespace std;
|
||||
using std::bitset; // Work around struct ::bitset on rtems.
|
||||
|
||||
bitset<5> b5;
|
||||
string s0 = b5.to_string<char, char_traits<char>, allocator<char> >('a', 'b');
|
||||
|
Loading…
Reference in New Issue
Block a user