Boost logo

Boost :

Subject: Re: [boost] [guidelines] why template errors suck
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2010-09-26 08:51:34


Jeremy Maitin-Shepard a écrit :
> Obviously actual timing data would be useful, but it seems that in some
> cases these techniques might result in increased compilation time, which
> is at least as serious a problem as the error messages.

Indeed.

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.


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