Consider the following code:
template<typename... Args1>
constexpr size_t direct = sizeof... (Args1);
template<template<typename... Args1> typename A1>
constexpr size_t nested = sizeof... (Args1); // compile error ☹️
Nested line does not compile since (I presume) Args1 is a nested argument.
Is there a way to work around this in a non-intrusive way? By intrusive I mean modifying types passed, for example adding
constexpr size_t sizeof_args = sizeof... (Args...);
to each template passed to this template.
Note: I am fine with using C++20 concepts, but AFAIK they do not offer improvements in this space.