Boost logo

Boost :

Subject: Re: [boost] [guidelines] why template errors suck
From: Jeremy Maitin-Shepard (jeremy_at_[hidden])
Date: 2010-09-24 19:34:36


On 09/24/2010 09:00 AM, Eric Niebler wrote:
> This is borderline self-promotion and I fretted posting this. But we a
> community of advanced C++ library developers and I'd really like
> feedback about these issues. And they really do involve Boost library
> development. If we could reach agreement about these techniques, we
> might want to integrate them into Boost's coding guidelines.
>
> http://www.reddit.com/r/programming/comments/diddg/expressive_c_why_template_errors_suck_and_what/
>
> Comments?
>

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.

Also, rather than use the technique mentioned at the end of the article
for ensuring that compilation does not continue (and produce additional
errors) after certain static assertions fail, at the cost of increased
code complexity (and likely increased compile time), this purpose may be
better served by a compiler option that causes compilation to abort
after the first error (e.g. -Wfatal-errors in the case of gcc).


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