mardi 4 avril 2017

Iterate with constexpr

I'd like to write something like that :

template<int i> void f() {}

for (constexpr int i : {1,2,3})
{
    f<i>();
}

Is it possible to iterate on constexpr ?

Thank you

Aucun commentaire:

Enregistrer un commentaire