Boost logo

Boost :

Subject: Re: [boost] [concept] EqualityComparable metafunction
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2011-09-14 14:22:03


2011/9/14 Frédéric Bron <frederic.bron_at_[hidden]>

> I am working on it right now and wanted to publish the new names with
> a new version in the sandbox, ready to be included. But yes the result
> is C plus an additionnal has_unary_minus (see below).
> Frédéric
>
> # binary
> + has_plus
> - has_minus
> * has_multiplies
> / has_divides
> % has_modulus
> += has_plus_assign
> -= has_minus_assign
> *= has_multiplies_assign
> /= has_divides_assign
> %= has_modulus_assign
> & has_bit_and
> | has_bit_or
> ^ has_bit_xor
> &= has_bit_and_assign
> |= has_bit_or_assign
> ^= has_bit_xor_assign
> << has_left_shift
> >> has_right_shift
> <<= has_left_shift_assign
> >>= has_right_shift_assign
> == has_equal_to
> != has_not_equal_to
> < has_less
> <= has_less_equal
> > has_greater
> >= has_greater_equal
> && has_logical_and
> || has_logical_or
> # prefix
> ! has_logical_not
> + has_unary_plus
> - has_unary_minus
> - has_negate
> ~ has_complement
> * has_dereference
> ++ has_pre_increment
> -- has_pre_decrement
> # postfix
> ++ has_post_increment
> -- has_post_decrement
>

I notice (just now) that unary & and [] are absent. Detection of operator[]
needs an entirely different mechanism than the above operators, so I
understand its absence (but maybe it could still be included?). I'm not
sure detection of unary operator& would be all that useful most of the time,
but I'm just wondering what the reasons were for its exclusion.

FWIW, I couldn't find answers to the above questions from browsing the
(obviously outdated) documentation in sandbox/type_traits. If there's
updated documentation browsable online that address this, feel free to just
direct me there :)

- Jeff


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