Having a variational pattern is simple, and I can specialize it, so it only accepts TStringConstantwhich is string_constantfor some chars:
template <typename TStringConstant, typename TValue>
class entry;
template <char... key, typename TValue>
class entry<string_constant<key...>, TValue>{}
If I wanted to create a template class that would take the variational number of TStringConstantdifferent chars, was there a way to do this? Perhaps with template template options?
So, all of the following conditions will be valid:
entry_list<string_constant<'c','b','a'>, string_constant<'d','e','f','g'>>();
entry_list<string_constant<'c','b','a'>, string_constant<'d','e','f','g'>, string_constant<'d','e','z','z'>>();
entry_list<string_constant<'a','b','c'>>();
A bonus if it is rejected entry_list<something_else<'c','b','a'>>in the same way as it entry<something_else<'c','b','a'>, bool>will not be compiled.