This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Make string_view operations involving CharT* *not* noexcept and consistent beween string_view and string_view.tcc.


On 16/04/14 10:57 -0400, Ed Smith-Rowland wrote:
The latest library fundamentals paper has a lot of changes coming - a lot of constexpr in the find type functions. Unfortunately, most of that will wave to wait until we get C++14 constexpr.

Yeah, there's no way we can put constexpr on e.g. string_view::swap()
yet :-)


Also, if the built-in strlen is or could be made constexpr then all the char* ctors could be constexpr as well.

I think we'd need to make char_traits<char>::length() constexpr too,
and that's not allowed by the standard.

As a result users can only really benefit from everything in
string_view being constexpr if they provide their own char traits
implementation with constexpr functions.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]