Eric Niebler a écrit :
This question has come up a couple of times. The solution isn't very pretty ... write a grammar that allows expressions with incompatible terminals, and then write a separate transform that checks the terminals for compatibility. This issue came up during Proto's review and I posted some example code here (see the SameTerminals transform): Well I thought to have template grammar ;) aka :
template<class T> struct simd_grammar : terminal< simd<T> > .... {}; Then vec<T> extends a domain which is based on simd_grammar<T>. Not sure it's more elegant though. I'll dig this during the week. -- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35