Boost logo

Boost :

Subject: Re: [boost] Provisional Boost.Generic and Boost.Auto_Function (concepts without concepts)
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2010-12-15 16:06:44

On Wed, Dec 15, 2010 at 2:19 PM, Dave Abrahams <dave_at_[hidden]> wrote:

> I don't see a problem. If you answer the question by giving foo an
> operator* of its own, the two implicitly-generated concept maps are
> the same concept map.

The problem is if the base concept specifies, for instance, an associated
type requirement, possibly not even with a default. The concept map for
"left" will have to specify this associated type and so will the concept map
for "right". So, what happens when trying to access the concept map for
base? Do you use the associated type specified by "left" or the one
specified by "right"? This is especially problematic if the associated type
is specified as something different in the concept map for "left" than from
the concept map for "right".

Marcin Zalewski answered this in a more recent reply in this thread --
apparently the last draft with concepts specifies that the two concept maps
are checked for compatibility. There is an error if there is conflict. I
should probably be able to do something similar in Generic, though it may
end up being complicated (and complicated is a relative term with respect to
the library already). With the implementation I'm imagining I can already
see an ODR issue that would be tough, but not impossible, to account for.

> I need more information. Please try to write out a complete example
> (using ConceptC++ syntax, please).

Marcin's recent reply should demonstrate what I meant.

-Matt Calabrese

Boost list run by bdawes at, gregod at, cpdaniel at, john at