Add specialization for pretty printing of std::string_view, avoiding it to be recognized as a container type and printed as something like {'t', 'e', 's', 't'}.
Adjust the order or pretty print functions so that the specializations for sum types such as std::variant and container types comes last. Otherwise calling pretty_print to something like std::pair<std::string_view, std::string_view> still gives output like {{'t', 'e', 's', 't'}, {'t', 'e', 's', 't'}}, maybe due to the template resolution order of C++ (which I am not very familiar with). Change the order could solve this.
This PR mainly:
std::string_view
, avoiding it to be recognized as a container type and printed as something like{'t', 'e', 's', 't'}
.std::variant
and container types comes last. Otherwise callingpretty_print
to something likestd::pair<std::string_view, std::string_view>
still gives output like{{'t', 'e', 's', 't'}, {'t', 'e', 's', 't'}}
, maybe due to the template resolution order of C++ (which I am not very familiar with). Change the order could solve this.