Closed iglesias closed 5 months ago
I like that it makes it hard to mistype the default value!
While reviewing the change here just came up that could be better passing string_view. I can give a go to that soon if so.
As I was on my way to compare the generated assembler via minimal examples with std::string
and std::string_view
, I have arrived at doing it in constexpr.
The analysis is an overkill for the problem at hand - I don't expect any real perf overhead from passing the options strings by value. Still, I just find it fun to analyze and in this case it could add compile-time tests of this from C++23.
Updated, @lisitsyn, deducing the template param.
While reviewing the change here just came up that could be better passing string_view. I can give a go to that soon if so.