|
Boost : |
Subject: Re: [boost] Formal Review Request: TypeErasure (docs, Concept Maps misnamed?)
From: Larry Evans (cppljevans_at_[hidden])
Date: 2012-06-23 11:55:54
On 06/21/12 21:38, Steven Watanabe wrote:
> AMDG
>
> On 06/21/2012 04:49 PM, lcaminiti wrote:
>>
>> I read the docs and didn't find the concept naming confusing (on the
>> contrary, it's "standard" terminology). However, I agree that a Wiki
link to
>> concepts would be useful from in the docs as not all readers will be
>> familiar with the C++0x concept proposals:
>> http://en.wikipedia.org/wiki/Concepts_(C%2B%2B)
>>
>
> The only use of "Concept Map" is the title
> of the section. I believe that the contents
> of the section make it sufficiently clear
> what I'm talking about.
>
The contents say:
Sometimes it is useful to non-intrusively adapt a type to model a
concept. For example, suppose that we want to make std::type_info
model less_than_comparable. To do this, we simply specialize the
concept definition.
which is clear, especially the part:
specialize the concept definition.
However what is not clear is how the title, "Concept Map", is related
to what's in the content. That's what prompted my original post in
this sub-thread:
http://article.gmane.org/gmane.comp.lib.boost.devel/231814
Your response:
b) "Concept Map" is the concept term for
specialization.
shown here:
http://article.gmane.org/gmane.comp.lib.boost.devel/231815
prompted me to google for "C++ Concept Map" which lead to here:
http://en.wikipedia.org/wiki/Concepts_%28C%2B%2B%29#Concept_maps
and only after reading that was the rationale for the title clear.
(However, after thinking some more, it seems a combination of the
concept definition *and* the concept_interface corresponds to the
"Concept Map" shown in the wikipedia article. That's because the
concept definition has no member functions (such as operator+ or
push_back) defined in it. The concept definition, AFAICT, only
needs to supply a static member function called apply.
*/libs/type_erasure/doc/html/boost_typeerasure/conceptdef.html
The member functions are added by concept_interface.
libs/type_erasure/doc/html/boost_typeerasure/concept.html#boost_typeerasure.concept.custom
Only after the member functions are added by the concept_interface is
an entry for the concept map complete. I guess, here, the map is from
a type, T, to an any type like T but with the added member functions
added by the combination of the concept definition and the
concept_interface. Is that about right?
).
In summary, as you say, the content is clear, but the rationale for
the title is not, unless a link to something like the wikipedia
article is provided.
HTH
-regards,
Larry
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk