Currently, it is defined as:
template<constexpr-param T, constexpr-param... Args>
constexpr auto operator()(this T, Args...) noexcept
requires requires(Args...) { constant_wrapper<T::value(Args::value...)>(); }
{ return constant_wrapper<T::value(Args::value...)>{}; }
The requires clause here is
requires requires(Args...) { constant_wrapper<T::value(Args::value...)>(); }
First, the Args... here seems redundant, since we can already access the Args... in the template parameter list.
Second, the () here actually means the construction of constant_wrapper, it seems that using {} is more appropriate and consistent with the return statement and the function body.
So in my opinion, this should be better with (most likely editorial):
template<constexpr-param T, constexpr-param... Args>
constexpr auto operator()(this T, Args...) noexcept
requires requires { constant_wrapper<T::value(Args::value...)>{}; }
{ return constant_wrapper<T::value(Args::value...)>{}; }
Or even better with typename (probably not editorial):
template<constexpr-param T, constexpr-param... Args>
constexpr auto operator()(this T, Args...) noexcept
requires requires { typename constant_wrapper<T::value(Args::value...)>; }
{ return constant_wrapper<T::value(Args::value...)>{}; }
Please let me know if I'm missing anything.
Currently, it is defined as:
The requires clause here is
requires requires(Args...) { constant_wrapper<T::value(Args::value...)>(); }First, the
Args...here seems redundant, since we can already access theArgs...in the template parameter list.Second, the
()here actually means the construction ofconstant_wrapper, it seems that using{}is more appropriate and consistent with the return statement and the function body.So in my opinion, this should be better with (most likely editorial):
Or even better with
typename(probably not editorial):Please let me know if I'm missing anything.