[Bug libstdc++/16020] New: [3.4/3.5 regression] cannot copy __gnu_debug::bitset
redi at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Jun 16 12:12:00 GMT 2004
This is a FAIL when running the libstdc++ testsuite with -D_GLIBCXX_DEBUG.
testsuite/23_containers/bitset/operations/1.cc fails to link because
bitset inherits from _Safe_sequence_base, which has protected but
undefined copy ctor and op=, due to this change:
2004-05-22 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/12854
Fixups for -Weffc++.
[snip]
* include/debug/safe_base.h (_Safe_sequence_base): Declare copy
constructor and assignment operator protected.
(_Safe_iterator_base): Same.
* include/debug/formatter.h (_Error_formatter): Define copy
constructor and assignment operator.
Simplified, the test case is:
#define _GLIBCXX_DEBUG
#include <bitset>
int main()
{
std::bitset<5> b;
std::bitset<5> bb(b);
b = bb;
}
This gets undefined references with recent CVS builds of 3.4 or 3.5
My copies of the standard are packed away so I can't check whether bitset
should be copy constructible and assignable.
Dinkumware's docs and the last public draft standard seem to say no (are
the copy ctor and op= implied?) while SGI's docs, the v3 sources and
Comeau say yes (which is good enough for me).
So I think we should define those members for _Safe_sequence_base.
--
Summary: [3.4/3.5 regression] cannot copy __gnu_debug::bitset
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: redi at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16020
More information about the Gcc-bugs
mailing list