Boost logo

Boost :

Subject: Re: [boost] Concept Traits Library
From: Edward Diener (eldiener_at_[hidden])
Date: 2010-07-10 18:42:23


On 7/10/2010 3:49 PM, Frédéric Bron wrote:
>> I would also like to see the operator detection in the CTL added to Boost,
>> even with the known limitations for operators which must be member
>> functions, but I do not know if you feel this would also be an addition to
>> the type traits library ? I know that Frederick Bron has added some traits
>> to the type_traits in the sandbox which are a subset of all the operator
>> traits in the CTL but he appears to have stopped with what he was doing
>> because he found out the CTL already existed.
>
> I was very near submitting the operator traits but was stopped when
> someone suggested to check before it it was not already in the CTL. I
> checked and saw that it was included in it (however with less
> flexibility). The conclusion was that the CTL was much larger library
> and was very interesting but I did not have enough time to revive it.
>
> What I can say is that there is some differences between the traits I
> proposed and the one of the CTL: in CTL, there is no check of return
> type. We had quite a long dicussion about this and ended to a nice
> solution which is to check or not (optional) for the return type to be
> convertible to a given type.
> If we agree to add only the operator traits to the type_traits library
> separatly from the CTL, I think that my proposal is nearly ready and I
> can do the extra work.

That would be great. I am willing to help any way I can as needed. I
would love to see operator traits added to Boost. The improvement of the
check on the return type is definitely a good feature.

> If we want to add the CTL, it is better if
> someone else does it as it would be too much work for me.

I completely agree with you.

Adding the CTL is really up to the CTL developers. In the last e-mail I
received from Terje Slettebo he indicated that he might be willing to
re-visit the CTL again now that Concepts will no longer be in C++0x. He
said he is currently on vacation but I hope to hear from him when he
gets back as I sent him a message in reply. If anyone knows how to
contact Tobias Schwinger I would be glad to get his feelings about the
CTL, since he is listed along with Terje Slettebo as the co-author.

>
> However, if Edward would like to finish my work, I have also no objection.

I would like to see some of the type_traits_ext metafunctions in the CTL
also added to Boost, unless of course their functionality is going to be
surfaced in what you have been doing or the CTL authors revive their
efforts. I feel that they would be very useful in general as
metafunctions for discovering whether a type has members of certain
types, data, or functions. Covering these possibilities seems to me
potentially very useful on its own, even with the current limitations
regarding these metafunctions. Joel Falcou also has some similar
metafunctions along the same lines, but slightly different, for his
introspection library and I think combining the CTL's and introspections
metafunctions into a little more flexible set would be advantageous as a
separate library, or as an addition to the type_traits library.

I am willing to wait to hear from Terje Slettebo and Tobias Schwinger to
see whether or not they are willing to work on and submit the CTL again,
but I will also work on my own in the meantime to combine
type_traits_ext and the two introspection type discovery metafunctions.
I do not flatter myself that I can necessarily improve what is already
there, but I do have a good sense of how to present things to be easier
and/or clearer for end-users to use.


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