Boost logo

Boost :

Subject: Re: [boost] [TypeTraits] is it possible to add something to boost.type_traits?
From: Edward Diener (eldiener_at_[hidden])
Date: 2009-12-15 21:07:02


frederic.bron_at_[hidden] wrote:
>
> Dear boost implementers,
> TypeTraits is very useful, thanks you.
> However, recently, I needed something to know if a type is comparable (with operator<) and that was not in the library.
> Fortunately, somebody forwarded me an earlier post on the users list where I could find what I wanted. The implementation was inspired from boost/detail/is_incrementable.hpp
> I have written is_less_comparable, is_less_equal_comparable, is_greater_comparable... inspired from the same source and I wonder if it could be possible to add it to the library as I think it could be
> helpful for others. I give the source code below (if it is useful) but I am not able to make it fully general as it is in boost/type_traits. In particular, I do not understand all the macros that are
> used.

It would really be nice to have type_traits for all the possible
user-defined operators. As part of that it seems that
boost/detail/is_incrementable.hpp could be lifted from the boost::detail
namespace and put into those new type_traits. I know you mentioned
subsequently in another post that you are working on more of the
operators but I do not know if you had decided to provide type_traits
for all of the user-defined operators. If you had not decided to do all
of them, I would like to encourage you to do so if you feel that the
work to do them is not overwhelming. I will be glad to help test them
out from within my own work since I am developing a template library in
which I could use all of them.


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