#Applying Concepts to Variadic Args

1 messages · Page 1 of 1 (latest)

sharp lichen
#

Say I have

template <typename T>
concept Pizza = ...;

and I have a method

template <typename ...Args>
void test(...) { ... }

I want to make sure all the Args passed to test pass the concept Pizza. How can I require that everything in a collection pass this concept (requires Pizza<Args>...)?

low oceanBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For more information use !howto ask.

spark abyss
#
template<Pizza... Args>
sharp lichen
#

OOC can this be done in a requires statement

spark abyss
#
void test() requires (Pizza<Args> && ...)
sharp lichen
#

welp I've been out done

#

tysm

spark abyss