Boost logo

Boost :

Subject: [boost] status of type traits addition (has_operator_xxx)
From: Frédéric Bron (frederic.bron_at_[hidden])
Date: 2011-01-13 15:09:29


Here is the status of the type-traits addition:
- I added the following operators: +=, *=, -=, /*, %=, &=, |=, ^=, <<,
>>, >>=, <<=, prefix ++, prefix --, postfix ++, postfix -- so that the
covered operators are now:
- I added in the doc. the fact that private operators are not covered
and lead to compile time errors
- for operators on built-in types that require integer arguments (%,
bitwise op.): I replaced a long list of specialiazation by an
automatic detection

Remaining work:
1. check what happens for pointer arguments,
2. implement trait for:
  . operator=
  . has_address_of_op<T>
  . has_dereference_op<T>
  . has_member_access_op<T>
  . has_subscript_op<T1 [,T2]>
  . has_pointer_to_member_op<T1 [,T2]>
  . has_comma_op<T1 [,T2]>
  . has_function_call_op<T,R [,P1, ...]>
3. have an MPL predicate for return value

As I have only little time (full time work and 3 young children...), I will:
- certainly do 1.,
- I will certainly leave 3. to somebody else in the future because I
am not enough agile with MPL,
- as for 2., 3 possibilities:
  (i) I do it but it will probably postpone the addition for a long time,
  (ii) I just leave it and I know is is a shame not to provide all
operator detection (nobody's perfect) or
  (iii) somebody else agrees to add them and have them reviewed at the
same time.

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