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]

RE: bitset ctor multiply defined



+ I'll still mostly be in lurk mode for a while, though.  I just got back
+ from my honeymoon a couple of weeks ago,

Congratulations.

+ and I'm still trying to deal with
+ the backlog.  (I'm afraid I ended up just deleting most of this list's
+ traffic from May.)

Aw, you missed all the best parts.


This was my hack/patch to the v3 implementation (not the SGI one).  It
doesn't deserve to be called a patch, since all I did was comment out the
ctor that's always present.  This is also the one that had endpoints for
the string, with default arguments for both.  After commenting, doing
"bitset<n>  b (a_string);" now calls the first member-template ctor inside
the #ifdef's, the one which takes only a default starting point for the 
string.

This hack seems like it ought to break more than it does, but all three
combinations of the ctor signature in 23.3.5.1 are still there, regardless
of the __STL_MEMBER_TEMPLATES setting.

(I would have cc'd this to c.l.c++.m like Benjamin suggested, but we don't
have Usenet access from work, and telnetting to the freeware account is too
#!@$ slow during the daytime traffic.  *whine*)

Phil


Index: stl/bits/std_bitset.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/stl/bits/std_bitset.h,v
retrieving revision 1.18
diff -c -3 -r1.18 std_bitset.h
*** std_bitset.h	1999/05/17 20:03:29	1.18
--- std_bitset.h	1999/06/08 14:19:12
***************
*** 648,653 ****
--- 648,654 ----
    bitset(unsigned long __val) :
      _Base_bitset<__BITSET_WORDS(_Nb,_WordT), _WordT>(__val) {}
  
+ #if 0
    template<class _CharT, class _Traits, class _Alloc>
    explicit bitset(const basic_string<_CharT,_Traits,_Alloc>& __s,
                    size_t __pos = 0, 
***************
*** 658,663 ****
--- 659,665 ----
        __STL_THROW(out_of_range("bitset"));
      _M_copy_from_string(__s, __pos, __n);
    }
+ #endif
  
  #ifdef __STL_MEMBER_TEMPLATES
  


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