[SG10] P0272: non-const string data
Nevin ":-)" Liber
Nevin
Sat Mar 12 02:13:44 CET 2016
On Mar 11, 2016, at 4:02 PM, Jens Maurer <Jens.Maurer at gmx.net> wrote:
>
> For
> s.data()
>
> the workaround is something like
>
> &s[0]
>
> (Both const and non-const.)
It's slightly worse:
v.empty() ? nullptr : &v.front()
But other than that I agree you don't need a macro to test for it.
--
Nevin ":-)" Liber <mailto:nevin at eviloverlord.com> +1-312-623-5420
More information about the Features
mailing list