This is the mail archive of the libstdc++@gcc.gnu.org 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]
Other format: [Raw text]

Re: [RFH] Puzzling behaviour with a wstring constructor


On Tue, Mar 18, 2003 at 09:56:27PM +0100, Paolo Carlini wrote:
> with current mainline (vs 3.2.2, 3.3 pre) the following doesn't link:
> 
>  // template<typename _InputIter>
>  //   basic_string(_InputIter begin, _InputIter end, const allocator& a)
>  // where _InputIter is integral [21.3.1 para 15]
>  std::wstring s(10, 0);
> 
> On the other hand the string version is ok.
> Also, FWIW, are both ok:
>    std::wstring s((unsigned)10, 0);
> and
>    std::wstring s(10, (unsigned)0);
> 
> I'm really puzzled: is the testcase above (which I blindly adapted from 
> the string version) correct or must be amended?
> ... 
> P.S. EDG + Dinkum also compile it just fine.

Is this a place for another of those "do the right thing" hacks?

Nathan Myers
ncm-nospam at cantrip dot org


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