Boost logo

Boost :

Subject: Re: [boost] [guidelines] why template errors suck
From: David Abrahams (dave_at_[hidden])
Date: 2010-09-28 14:22:54


At Tue, 28 Sep 2010 18:45:23 +0100,
Mathias Gaunard wrote:
>
> On 28/09/10 18:33, David Abrahams wrote:
> > At Tue, 28 Sep 2010 10:00:54 -0500,
> > Andrew Sutton wrote:
> >>
> >> It seems to me that writing constraints in terms of valid
> >> expressions gives you flexibility when you want it, but doesn't
> >> preclude the strengthening of requirements when needed.
> >
> > It's not that there's anything you *can't* express with valid
> > expressions, it's that they're difficult to use correctly, and the
> > most natural way of using them creates a big mess for algorithm
> > writers. Furthermore, they don't offer any compelling value over the
> > alternative.
>
> Please demonstrate how you check that a type models a concept without
> using a set of valid expressions to define the concept, but only with
> signatures

See the implementation of ConceptGCC. There's a demonstration in
working code. But...

> in an archetype-like fashion.

...the whole sentence became meaningless to me when you added "in an
archetype-like fashion." I have no idea what it means, and it seems
incongruous to bring up archetypes in the context of a discussion of
the mechanics of checking conformance of a type to a concept.

-- 
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