Boost logo

Boost Users :

Subject: Re: [Boost-users] [Proto] Extracting types of sub-expression in transform
From: Joel Falcou (joel.falcou_at_[hidden])
Date: 2008-10-18 14:00:35

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

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at