From: Johan Torp (johan.torp_at_[hidden])
Date: 2008-05-08 03:58:27
Terje SlettebÃ¸ wrote:
>>From: "Anthony Williams" <anthony_w.geo_at_[hidden]>
>> Does the boost concept checking library support overloading on concepts,
>> you can have one implementation of an algorithm for random access
>> and another for bidirectional iterators, for example?
> As someone was pointed out in another posting, you can't use BCCL for
> since the checks fail with a compile error if a concept doesn't match.
> However, if you're able to define compile-time traits performing the
> check, then you _can_ overload on concepts, using enable_if. See the
> Traits Library
> ger/boostdev/concept_traits/libs/concept_traits/doc/) for an approach to
> This library is no longer maintained (at least by me, and unfortunately I
> don't have the source available right now, but Tobias Schwinger may have
> around somewhere), not at least due to the upcoming C++0x, where this is
> supported in the language.
> The above library was mostly an experiment about how to get support for
> concepts in a library solution, but you really need language support to
> the full effect of concepts.
That's really interesting and exactly what I was looking for a while back!
According to David Abrahams
(http://www.nabble.com/forum/ViewPost.jtp?post=15220025&framed=y) you can't
implement all requirements of all concepts as traits though. Did you bump
into this? What kind of requirements can't be implemented as traits?
I'll have a look at your library later on today.
Best Regards, Johan
-- View this message in context: http://www.nabble.com/Overloading-on-concepts-tp17104187p17122251.html Sent from the Boost - Dev mailing list archive at Nabble.com.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk