Subject: Re: [boost] [metaparse] Practical usefulness
From: Abel Sinkovics (abel_at_[hidden])
Date: 2015-06-04 15:02:39
On 2015-06-04 08:49, TONGARI J wrote:
> It seems to use the similar trick that I posted in an older thread (you'd
> been there too):
> We all know that it can't replace your STRING implementation since it
> cannot be used in unevaluated context.
You're right, I forgot about that thread.
> Here's a demo of toy compile-time parser that mimics Boost.Spirit:
This trick here seems to be the same as in Evgeny's code: create a
lambda function from the string and pass it to a template function as
argument and use it *inside* the template function, so no need to put
decltype around the expression containing the lambda (and therefore
using lambda in an unevaluated context can be avoided).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk