Boost logo

Boost Users :

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


i have a DSL where terminal are defined like : terminal< simd<proto::_> >
What I want is that any binary operator that apply on those terminal should
be available only if both lhs and rhs parts have the same underlying
type. E.G :

simd<float> + simd<float> is ok while
(simd<char> + simd<char>)*simd<float> is not ok.

How I can enforce this check ? Is having a transform that take an
expression and returns
the underlying type OR mpl::void_ if an error occurs the good solution ?

Thanks in advance

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