This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Make vector::at() assertion message more useful (try #2)
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Paul Pluzhnikov <ppluzhnikov at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Thu, 05 Sep 2013 01:26:37 +0200
- Subject: Re: [patch] Make vector::at() assertion message more useful (try #2)
- Authentication-results: sourceware.org; auth=none
- References: <ye6qhae0qpf8 dot fsf at elbrus2 dot mtv dot corp dot google dot com>
On 09/04/2013 10:53 PM, Paul Pluzhnikov wrote:
For sure concat_size would not be Ok, isn't uglified. Thanks for the
code, you understand isn't really something we can imagine committing.
I am not at all sure the names I choose here are good ones. Suggestions
I also shudder at the idea of repeating _M_range_check code in
e.g. string::at(), and elsewhere. Perhaps we need a snprintf_lite, that
only understands '%zu' and literal characters, e.g.:
_N("vector::_M_range_check: __n (which is %zu) >= "
"this->size() (which is %zu)"), __n, this->size());
That seems worth exploring, I agree.