15 Jan
2016
15 Jan
'16
4:41 a.m.
On Wed, Jan 13, 2016 at 11:43 AM, Niall Douglas
Sadly, the current proposal for string_view does not provide a default Traits length function which is constexpr for const char *. Yes, I find that very daft as a default design choice for a string_view, but the macro at least makes it not too irritating.
It uses the existing char_traits classes, which, as you note, are not constexpr. (for some *very odd* reasons).
But writing your own traits class that has constexpr len/compare/etc is really, really simple. Maybe I'll do that this weekend, and add it to boost. :-) -- Marshall