Eric Niebler a écrit :
Could you tell me a bit more about your usage scenario? This is certainly an area in which Proto can improve, and I want to understand your requirements. I'm still working with this vec<T> grammar.
Basically I have template domain and template grammar and I want to have element of two different grammar type instance to be usable by the other for some operator/function. For example, I have a SIMD float entity : vec<float> x; Normally, the grammar that dictates this entity behvaior is tempalte<class SIMDTypeInfo> struct grammar : or_< terminal< simd_data<SIMDTypeInfo> > , arithmetic_values , nary_expr< _, narg< grammar<SIMDTypeInfo> >
{};
(or something related)
This grmmar ensure that I can write things like :
vec<float>+vec<float>
but i can't do :
vec<float>+vec<char>
For most functions and operator it's sufficent.
But there is a few SIMD operator like for example exponent that can take
any vec<T> and return a vec