Subject: Re: [boost] dramatically improved template error messages
From: Andrew Sutton (asutton.list_at_[hidden])
Date: 2012-08-16 09:38:45
>> Using unused virtual functions to defer instantiation traps is
>> incredibly clever... If my understanding is correct :)
> The technique also works if the what() function is replaced with a
> non-virtual destructor. So I don't think "virtual" is the magic
> ingredient here.
Shoot. That sounded like such a reasonable explanation, too.
> Couldn't you avoid generating the error in sfinae_error and instead
> static_assert that a given function call doesn't have a sfinae_error
> return type?
You could (that's basically how Origin's concept checking stuff
works), but you'd still have the problem that every expression in the
constrained template will still be instantiated and type-checked so
you'll get errors.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk