This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

bitset ctor multiply defined



We were doing some memory experiments with bitset<N> and vector<bool>,
and found that the bitset ctor taking a string can be multiply defined
if member templates are available (via __STL_MEMBER_TEMPLATES).

This isn't a compiler warning, BTW; it prevents instantiation.


In instantiation of `bitset<40000000,long unsigned int>': 
bit.cc:16: instantiated from here
/home/pedwards/3/include/g++-v3/bits/std_bitset.h:679: `template <class
_CharT, class _Traits, class _Alloc> bitset<40000000,long unsigned
int>::bitset<_CharT, _Traits, _Alloc>(const
basic_string<_CharT,_Traits,_Alloc> &, unsigned int, unsigned int)' has
already been declared in `bitset<40000000,long unsigned int>'

Basically, bits/std_bitset.h is trying to declare multiple ctors, all
taking a string, with varying default parameters.  The one on line 652
is always present, with another one around line 679 showing up inside
the #ifdef's.  They are both being defined, not just declared.

Do we have any kind of feedback into SGI's implementation?


Phil
(If you reply to the list, please don't cc another copy to me.  Thanks.)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]