Boost logo

Boost :

Subject: Re: [boost] RFC Expression Validity Asserts
From: TONGARI J (tongari95_at_[hidden])
Date: 2015-01-22 20:24:09


2015-01-23 8:26 GMT+08:00 Matt Calabrese <rivorus_at_[hidden]>:

> On Thu, Jan 22, 2015 at 4:12 PM, Matt Calabrese <rivorus_at_[hidden]> wrote:
>
> > On Thu, Jan 22, 2015 at 4:09 PM, Matt Calabrese <rivorus_at_[hidden]>
> wrote:
> >
> >> For instance, you can use it to easily do:
> >>
> >> template <class T>
> >> struct has_preincrement_operator
> >> : std::integral_constant<bool, IS_VALID_EXPR((T) a, ++a)> {};
> >>
> >>
> >
> Hmm, actually this use doesn't seem to work, though I'm not sure why... I
> should have tested it in the browser before posting the sample. I'm pretty
> sure it fails due to a compile-bug but I'm not entirely certain.
>

I'm sure that lambda cannot be used in unevaluated context.


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