Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-01-12 13:14:11


Hi Paul,

On Fri, 12 Jan 2001, Moore, Paul wrote:

paul.m> From: Jeremy Siek <jsiek_at_[hidden]>
paul.m> > Ahh, a place where concept checking archetypes would have caught the
paul.m> > problem! I'd encourage Paul Moore to try the concept
paul.m> > archetype technique with the rational number library.
paul.m>
paul.m> I'll try to find time to have a look at it - I haven't
paul.m> seen the book, so I'll have to go from what is available
paul.m> on the boost site - can anybody give me any good pointers
paul.m> on how to start?

There's no book about this, at least not yet ;)
  The main concept checking page is at
    http://www.boost.org/libs/concept_check/concept_check.htm
  and the stuff about archetypes is at
    http://www.boost.org/libs/concept_check/concept_covering.htm

The archetype idea is pretty simple: just code up a class that *minimally*
implements the requirements of the IntegerType. The member functions of
the class do not have to do anything... it will only be used for a compile
check. Once you have the class coded up, try to use it inside the rational
class. You'll want to make sure that all of rational's functionality gets
compiled when you do this check.

Cheers,
Jeremy

----------------------------------------------------------------------
 Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
 Ph.D. Candidate email: jsiek_at_[hidden]
 Univ. of Notre Dame work phone: (219) 631-3906
----------------------------------------------------------------------


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