On 30/11/14 20:48 +, Jonathan Wakely wrote:
I think we also need this to make __numpunct_cache and
__moneypunct_cache exception-safe. If we set _M_allocated=true at the
start of the _M_cache functions and then an allocation throws we will
delete[] the memory allocated in _M_cache, but then th
Finally, does anyone know why we don't use the stored size in the
facet virtual functions that return strings? e.g.
virtual string
do_grouping() const
{ return _M_data->_M_grouping; }
We could save the cost of a strlen call:
virtual string
do_grouping() const
{ ret
I think we also need this to make __numpunct_cache and
__moneypunct_cache exception-safe. If we set _M_allocated=true at the
start of the _M_cache functions and then an allocation throws we will
delete[] the memory allocated in _M_cache, but then the cache's
destructor will see _M_allocated==true
These are a few small things I noticed while working on the facets,
which I'm going to commit separately.
Tested x86_64-linux and powerpc64-linux, committed to trunk.
commit 384475184b4245ac23cb35a363e7e8d98838ec2e
Author: Jonathan Wakely
Date: Sat Nov 29 20:45:10 2014 +
* src/c++9