Subject: Re: [boost] C++11 decltype/SFINAE puzzler
From: John Maddock (boost.regex_at_[hidden])
Date: 2012-08-13 03:46:48
> Right. It can be easily turned into a compile-time error by
> static_assert'ing that the function's return type is not sfinae_error,
> but the compiler error wouldn't be informative. You'd have to run to
> code to see the error.
> I was hoping to have a way to transport the error to an API boundary and
> reporting it there, instead of presenting users with an imposing
> template instantiation backtrace, but that might not be possible.
I haven't followed this discussion, but you can move static_assert's up the
call stack by moving the condition into an enable/disable_if, then the
compiler simply doesn't find the function and you get the error "sooner".
But you've probably considered all this already yours, John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk