Boost logo

Boost :

From: Alexander Grund (alexander.grund_at_[hidden])
Date: 2019-12-05 08:15:16


> ```
> void fixed_string<N>::resize(size_type s)
> {
> BOOST_FIXED_STRING_PRECONDITION(s <= this->capacity());
> // then do the job
> }
> ```

+1 on that. I'm always advocating for safe-by-default and found it a
huge mistake to make operator[] the unchecked one instead of at()

So using BOOST_FIXED_STRING_PRECONDITION which throws by default is the
right choice IMO.




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk