Boost logo

Boost :

Subject: Re: [boost] review request: addition to type_traits library of is_less_comparable<T, U> and others
From: Frédéric Bron (frederic.bron_at_[hidden])
Date: 2009-12-06 06:17:49


I am starting again to work on adding new traits to detect if two
types can be compared (is_less_comparable<T,U> and
has_operator_less<T,U>). Sorry for the long break but I could not find
any time for this in the past weeks.

A recent post on the list makes me think that we could enlarge the
scope of the addition. In fact, here is the list of binary operators
for which we could implement type trait detection:

* comparisons: <, <=, >, >=, ==, !=
* arithmetic operations: +, -, *, /, %
* logical operations: && (and), || (or)
* bitwise operations: <<, >>, ^ (xor), & (bitand), | (bitor)

I a in favor of implementing type traits to detect comparison and
arithmetic operators. What for logical and bitwise operations?

Frédéric


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