Boost logo

Boost Users :

Subject: [Boost-users] [Proto] grammar matching terminal or pointer to terminal
From: joel (joel.falcou_at_[hidden])
Date: 2009-09-28 15:17:41


I need to have a proto grammar that matches char, float or any pointer
to either char or float.
I tried :

struct cfptr :
or_< terminal<char>
      , terminal<short>
      , and_< cfptr
                 , if_< is_pointer< remove_pointer< 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?

-- 
___________________________________________
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 hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net