|
Boost : |
Subject: Re: [boost] Stupid Constexpr Lambda Trick
From: Giovanni Piero Deretta (gpderetta_at_[hidden])
Date: 2015-06-24 17:23:24
Hi Paul,
for some reason gmail insists in putting all your emails in the spam folder...
On Wed, Jun 24, 2015 at 3:55 AM, Paul Fultz II <pfultz2_at_[hidden]> wrote:
>> I came up with the trick when trying to implement an emulation of
>> N3617 (Lifting overload sets into function objects). Turns out that
>> implementing the 'quote' syntax is almost trivial in C++14 with
>> generic lambdas, but making it constexpr reliably has so far eluded
>> me as all implementations I have tried ICE both gcc and clang. Still
>> the constexpr lambda emulation itself seems to work.
>
> So it ICEs when doing constexpr lambda emulation to lift overloads?
>
yes. The non-constexpr implementation works fine. But to enable
constexpr, even with the trick above, you need to jump to a few levels
of nested lambdas to handle SFINAE and both GCC 5 nor clang 3.5 ICE or
fail to compile in all variation I have tried.
I need to try a more recent version of clang.
-- gpd
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk