Boost logo

Boost :

Subject: Re: [boost] [guidelines] why template errors suck
From: joel falcou (joel.falcou_at_[hidden])
Date: 2010-09-26 09:12:08


On 26/09/10 14:51, Mathias Gaunard wrote:
> The idea, in order to provide better error messages, is to test
> whether all the expressions you're going to evaluate are going to lead
> to errors.
>
> Then, if they don't, you evaluate said expressions. However, this
> basically ends up doing the same thing twice (or worse, checking the
> expressions are valid may be more costly than actually instanciating
> them) as far as the compiler is concerned.
>
> Therefore I think the solution is to provide a compiler debug mode in
> which we do this testing, and one where we don't.
>

In my own epxerience, I have a global ENABLE_COMPILE_TIME_CHECK macro
that control all instance of such tests.


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