Skip to content

Commit

Permalink
Add deduction guide to shut up nonsense CTAD warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Sirraide committed Oct 29, 2023
1 parent f4188ec commit eae50b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/clopts.hh
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@ struct static_string {
static constexpr bool is_static_string = true;
};

/// Deduction guide to shut up nonsense CTAD warnings.
template <size_t sz>
static_string(const char (&)[sz]) -> static_string<sz>;

template <std::size_t size>
struct string_or_int {
detail::static_string<size> s{};
Expand Down

0 comments on commit eae50b7

Please sign in to comment.