C++ Logo


Advanced search

Re: [SG7] Update: P1240R2 — Scalable Reflection

From: Peter Dimov <pdimov_at_[hidden]>
Date: Tue, 18 Jan 2022 20:28:58 +0200
> But on the other hand, if you have a `char const*`, it's trivial to obtain a
> string_view from it, whereas the reverse... isn't.

<source>:9:27: error: 'std::basic_string_view<char>' is not a valid type for a template non-type parameter because it is not structural
    9 | template<std::string_view sv> consteval auto to_charp()
      | ^~

Yeah :-(

Received on 2022-01-18 18:29:08