joel wrote:
I need to have a proto grammar that matches char, float or any pointer to either char or float.
What do you mean, any pointer? Do you mean, any level of indirection, like float****? Ignoring cv-qualifiers at all levels of indirection?
I tried :
struct cfptr : or_< terminal<char> , terminal<short>
Do you mean float here or short?
, and_< cfptr
You have infinite recursion here. An expression matches cfptr if <stuff> OR it matches cfptr and <stuff>.
, if_< is_pointer< remove_pointer< bp::value_>() >() >
There is no bp::value_. You probably mean bp::_value.
> {};
but it faisl to compile when i do :
cout << matches< typename terminal<short>::type, cfptr>::value ;
by telling me short is not a class or union.
should I cut this in two parts or is there a way to do this in one shot?
I don't know. Try telling me again what you're trying to do. -- Eric Niebler BoostPro Computing http://www.boostpro.com