public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] libstdc++: testsuite: work around bitset namespace pollution
@ 2022-06-22 0:44 Alexandre Oliva
0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2022-06-22 0:44 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:b2319ade83aecfc33da93b413e62ce8e22ef68e0
commit b2319ade83aecfc33da93b413e62ce8e22ef68e0
Author: Alexandre Oliva <oliva@adacore.com>
Date: Mon Jun 20 19:43:37 2022 -0300
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.
Diff:
---
libstdc++-v3/testsuite/23_containers/bitset/cons/dr1325-2.cc | 1 +
libstdc++-v3/testsuite/23_containers/bitset/ext/15361.cc | 1 +
libstdc++-v3/testsuite/23_containers/bitset/input/1.cc | 1 +
libstdc++-v3/testsuite/23_containers/bitset/to_string/1.cc | 1 +
libstdc++-v3/testsuite/23_containers/bitset/to_string/dr396.cc | 1 +
5 files changed, 5 insertions(+)
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/cons/dr1325-2.cc b/libstdc++-v3/testsuite/23_containers/bitset/cons/dr1325-2.cc
index 4b79c9f046d..2371bef09cc 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/cons/dr1325-2.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/cons/dr1325-2.cc
@@ -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) );
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/ext/15361.cc b/libstdc++-v3/testsuite/23_containers/bitset/ext/15361.cc
index 40cb94966ab..392470084ae 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/ext/15361.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/ext/15361.cc
@@ -22,6 +22,7 @@
void test01()
{
using namespace std;
+ using std::bitset; // Work around struct ::bitset on rtems.
bitset<256> b;
b.set(225);
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/input/1.cc b/libstdc++-v3/testsuite/23_containers/bitset/input/1.cc
index 8738c772383..939861b171e 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/input/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/input/1.cc
@@ -26,6 +26,7 @@
void test01()
{
using namespace std;
+ using std::bitset; // Work around struct ::bitset on rtems.
bitset<5> b5;
bitset<0> b0;
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/to_string/1.cc b/libstdc++-v3/testsuite/23_containers/bitset/to_string/1.cc
index f4af91373cc..8384eb96d25 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/to_string/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/to_string/1.cc
@@ -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> >();
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/to_string/dr396.cc b/libstdc++-v3/testsuite/23_containers/bitset/to_string/dr396.cc
index 8faded34847..dfba27ed3af 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/to_string/dr396.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/to_string/dr396.cc
@@ -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');
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gcc(refs/users/aoliva/heads/testme)] libstdc++: testsuite: work around bitset namespace pollution
@ 2022-06-21 0:15 Alexandre Oliva
0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2022-06-21 0:15 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:cb400f6da6f65daae29c3d03a5b106f732393baf
commit cb400f6da6f65daae29c3d03a5b106f732393baf
Author: Alexandre Oliva <oliva@adacore.com>
Date: Mon Jun 20 19:43:37 2022 -0300
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.
Diff:
---
libstdc++-v3/testsuite/23_containers/bitset/cons/dr1325-2.cc | 1 +
libstdc++-v3/testsuite/23_containers/bitset/ext/15361.cc | 1 +
libstdc++-v3/testsuite/23_containers/bitset/input/1.cc | 1 +
libstdc++-v3/testsuite/23_containers/bitset/to_string/1.cc | 1 +
libstdc++-v3/testsuite/23_containers/bitset/to_string/dr396.cc | 1 +
5 files changed, 5 insertions(+)
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/cons/dr1325-2.cc b/libstdc++-v3/testsuite/23_containers/bitset/cons/dr1325-2.cc
index 4b79c9f046d..2371bef09cc 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/cons/dr1325-2.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/cons/dr1325-2.cc
@@ -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) );
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/ext/15361.cc b/libstdc++-v3/testsuite/23_containers/bitset/ext/15361.cc
index 40cb94966ab..392470084ae 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/ext/15361.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/ext/15361.cc
@@ -22,6 +22,7 @@
void test01()
{
using namespace std;
+ using std::bitset; // Work around struct ::bitset on rtems.
bitset<256> b;
b.set(225);
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/input/1.cc b/libstdc++-v3/testsuite/23_containers/bitset/input/1.cc
index 8738c772383..939861b171e 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/input/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/input/1.cc
@@ -26,6 +26,7 @@
void test01()
{
using namespace std;
+ using std::bitset; // Work around struct ::bitset on rtems.
bitset<5> b5;
bitset<0> b0;
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/to_string/1.cc b/libstdc++-v3/testsuite/23_containers/bitset/to_string/1.cc
index f4af91373cc..8384eb96d25 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/to_string/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/to_string/1.cc
@@ -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> >();
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/to_string/dr396.cc b/libstdc++-v3/testsuite/23_containers/bitset/to_string/dr396.cc
index 8faded34847..dfba27ed3af 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/to_string/dr396.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/to_string/dr396.cc
@@ -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');
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gcc(refs/users/aoliva/heads/testme)] libstdc++: testsuite: work around bitset namespace pollution
@ 2022-06-21 0:07 Alexandre Oliva
0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2022-06-21 0:07 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:7c0edc48026cb9d88a6aee69bb11b1ce71075c5f
commit 7c0edc48026cb9d88a6aee69bb11b1ce71075c5f
Author: Alexandre Oliva <oliva@adacore.com>
Date: Mon Jun 20 19:43:37 2022 -0300
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.
TN: V527-031
Diff:
---
libstdc++-v3/testsuite/23_containers/bitset/cons/dr1325-2.cc | 1 +
libstdc++-v3/testsuite/23_containers/bitset/ext/15361.cc | 1 +
libstdc++-v3/testsuite/23_containers/bitset/input/1.cc | 1 +
libstdc++-v3/testsuite/23_containers/bitset/to_string/1.cc | 1 +
libstdc++-v3/testsuite/23_containers/bitset/to_string/dr396.cc | 1 +
5 files changed, 5 insertions(+)
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/cons/dr1325-2.cc b/libstdc++-v3/testsuite/23_containers/bitset/cons/dr1325-2.cc
index 4b79c9f046d..2371bef09cc 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/cons/dr1325-2.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/cons/dr1325-2.cc
@@ -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) );
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/ext/15361.cc b/libstdc++-v3/testsuite/23_containers/bitset/ext/15361.cc
index 40cb94966ab..392470084ae 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/ext/15361.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/ext/15361.cc
@@ -22,6 +22,7 @@
void test01()
{
using namespace std;
+ using std::bitset; // Work around struct ::bitset on rtems.
bitset<256> b;
b.set(225);
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/input/1.cc b/libstdc++-v3/testsuite/23_containers/bitset/input/1.cc
index 8738c772383..939861b171e 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/input/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/input/1.cc
@@ -26,6 +26,7 @@
void test01()
{
using namespace std;
+ using std::bitset; // Work around struct ::bitset on rtems.
bitset<5> b5;
bitset<0> b0;
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/to_string/1.cc b/libstdc++-v3/testsuite/23_containers/bitset/to_string/1.cc
index f4af91373cc..8384eb96d25 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/to_string/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/to_string/1.cc
@@ -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> >();
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/to_string/dr396.cc b/libstdc++-v3/testsuite/23_containers/bitset/to_string/dr396.cc
index 8faded34847..dfba27ed3af 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/to_string/dr396.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/to_string/dr396.cc
@@ -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');
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-22 0:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-22 0:44 [gcc(refs/users/aoliva/heads/testme)] libstdc++: testsuite: work around bitset namespace pollution Alexandre Oliva
-- strict thread matches above, loose matches on Subject: below --
2022-06-21 0:15 Alexandre Oliva
2022-06-21 0:07 Alexandre Oliva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).