Re: [proto] Default constructor of proto::extends

2011-02-07 Thread Antoine de Maricourt
Hi Eric, is there any reason why the default ctor of proto::extends uses the following form: extends() : proto_expr_() {} instead of simply extends() {} I use proto::extends over expressions that hold x86 SIMD registers (like proto::terminal<__m128i>), and the current version

[proto] Matching terminals holding a function pointer

2011-02-07 Thread Bart Janssens
Hi, I may be overlooking the obvious here, but I can't seem to find an easy way to match terminals containing a pointer to a function (of arbitrary type). The basic use case is this: I have some grammars that contain specific rules for terminals used as a function in certain cases, something along

Re: [proto] Matching terminals holding a function pointer

2011-02-07 Thread Eric Niebler
On 2/8/2011 3:38 AM, Bart Janssens wrote: > Hi, > > I may be overlooking the obvious here, but I can't seem to find an > easy way to match terminals containing a pointer to a function (of > arbitrary type). Sure there's an easy way. You can use proto::if_ and type traits: // untested struct Fu