Boost logo

Boost :

Subject: Re: [boost] [guidelines] why template errors suck
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2010-09-27 16:19:36


On Sep 27, 2010, at 11:04 AM, Smith, Jacob N wrote:

>> -----Original Message-----
>> From: boost-bounces_at_[hidden] [mailto:boost-
>> bounces_at_[hidden]] On Behalf Of Eric Niebler
>> Sent: Monday, September 27, 2010 10:53 AM
>> To: boost_at_[hidden]
>> Subject: Re: [boost] [guidelines] why template errors suck
>>
>> I can also find no examples in the standard of using concept maps to
>> map
>> one concept to another. Can you?
>
> I ported parts of the BGL, GIL, MTL, and IETL to ConceptGCC. Then I set up a modeling relationship between the various concepts (in layers) to implement the Shi-Malik algorithm for image segmentation. I wrote up the results:
>
> http://portal.acm.org/citation.cfm?id=1289971.1289984
>
> Mapping concept-to-concept is part of the core ideas defined by Gregor & Stroustrup.

But Dave got the syntax wrong. It works something like this:

template <ConceptA T>
concept_map ConceptB<T> {
 // implement ConceptB in terms of ConceptA here
}

Also, concept maps never contain concept constructs like requires, standalone typenames, or similar.

Sebastian


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