[patch] Make vector::at() assertion message more useful
Paolo Carlini
paolo.carlini@oracle.com
Sun Aug 18 12:33:00 GMT 2013
Hi,
On 08/18/2013 11:09 AM, Gabriel Dos Reis wrote:
>> What about adding a simple template function that converts integer into
>> std::string using division by 10? You could then concatenate the message
>> from std::string fragments, avoiding IO library but having to pull in
>> std::string instead. Would that be acceptable?
> I am not sure whether the conversion has to be template, but yes the use
> of snprintf is excessive force, and can be replaced by something along the
> line you suggest.
Note that we already have the __int_to_char template, which we also
instantiate 4 times in the library, only, are "t". Thus I guess it would
be just matter of writing a thin, exported, wrapper, around it.
Paolo.
More information about the Libstdc++
mailing list