C++ Logo

sg16

Advanced search

String views with strong code unit types

From: Lyberta <lyberta_at_[hidden]>
Date: Tue, 04 Jun 2019 07:38:00 +0000
I'm trying to replicate a "sv" UDL with strong code unit types.

constexpr auto operator "" _cus(const char8_t* literal, std::size_t size)

As view types require some outside storage, I'm will need to create an
array of code units in static memory. I'm not sure how to do that. Also,
the compiler says that "size" is not a constant expression. Any ideas?


Received on 2019-06-04 09:39:08