[RFH] Puzzling behaviour with a wstring constructor
Nathan Myers
ncm-nospam@cantrip.org
Tue Mar 18 21:00:00 GMT 2003
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@cantrip.org
More information about the Libstdc++
mailing list