Boost logo

Boost :

Subject: Re: [boost] [guidelines] why template errors suck
From: David Abrahams (dave_at_[hidden])
Date: 2010-09-28 10:20:19


At Tue, 28 Sep 2010 08:39:23 -0500,
Andrew Sutton wrote:
>
> Having done the exercise, I'm satisfied with my results (which agree with
> Mathias').

Great; let's see your work!

> I think your "left to the reader as an exercise" approach doesn't
> seem to be getting the point across. Perhaps you could provide a
> more concrete argument?

It's hard to provide an argument more concrete than an example that
doesn't work. But in fairness I guess it's also easy to overlook
non-workingness when you don't have a computer doing the checking for
you, or the STL wouldn't have been designed with the "valid
expression" approach...

OK, I found a good explanation. See §3.2.3 of
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1758.pdf

HTH,

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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