is_code_points(maybe_)replaceable
These two traits detect whether or not the given Encoding type have calls on them which return either a replacement range (is_code_points_repleacable
) or a std::optional
of a replacement range (is_code_points_maybe_replaceable
).
The former is useful when it is guaranteed that your encoding will have a replacement range on it and does not need the extra cost of an indirection from not knowing. The latter is useful when something like a wrapped encoding may or may not have a replacement sequence.
ztd::text::is_code_points_replaceable
ztd::text::is_code_points_replaceable_v
ztd::text::is_code_points_maybe_replaceable
ztd::text::is_code_points_maybe_replaceable_v