
Andy Little wrote:
"Andreas Pokorny" <andreas.pokorny@gmx.de> wrote in message <...>
// rules: template<typename EnableIfT> struct rule<example_domain,right_shift_tag,A,B,EnableIfT> : defined, mpl::true_ { typedef TYPE_WHICH_ENCODES_THE_EXPRESSION result_type; static result_type init(A const& a, B const& b) { return result_type(...); } };
template<typename EnableIfT> struct rule<example_domain,bitor_tag,TYPE_WHICH_ENCODES_THE_EXPRESSION,C,EnableIfT> : defined, mpl::true_ { typedef TYPE_WHICH_ENCODES_THE_WHOLE_TREE result_type; static result_type init(A const& a, B const& b) { return result_type(...); } };
I don't understand what these TYPE_WHICH_ENCODES_THE macros are, but can 't you use Boost.Typeof for this?
IIUC, the "rule" specifies the result type (not deduces the result type). I think it's not a macro at all; it would rather be something like: "unspecified_type", or "you-define-your-type-here-and-ill-do-the-rest" Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net