This is the mail archive of the
mailing list for the libstdc++ project.
Re: [RFH] Puzzling behaviour with a wstring constructor
- From: Nathan Myers <ncm-nospam at cantrip dot org>
- To: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Date: Tue, 18 Mar 2003 13:00:59 -0800
- Subject: Re: [RFH] Puzzling behaviour with a wstring constructor
- References: <3E7787FB.email@example.com>
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);
> 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?
ncm-nospam at cantrip dot org