Boost logo

Boost :

Subject: Re: [boost] [spirit] How to detect Spirit.Qi expressions?
From: TONGARI J (tongari95_at_[hidden])
Date: 2014-03-30 09:15:29


2014-03-30 20:52 GMT+08:00 Andrey Semashev <andrey.semashev_at_[hidden]>:

> Hi,
>
> Is there a way to detect at compile time that a certain type is a
> Boost.Spirit.Qi parser? That includes template expressions and grammars.
> Basically, I want to detect if qi::parse(b, e, expr) would be a sensible
> thing
> to do.
>
> I tried this:
>
> boost::is_same<
> typename proto::domain_of< ExpressionT >::type,
> spirit::qi::domain
> >
>
> But domain_of returns default_domain for Boost.Spirit.Qi template
> expressions.
>

Try this:
boost::spirit::traits::matches< Domain, Expr >


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk