Boost logo

Boost :

Subject: Re: [boost] [Review] Boost.Type Traits Extension by Frederic Bron
From: Frédéric Bron (frederic.bron_at_[hidden])
Date: 2011-03-15 04:46:57


> * shift operator could be named bit_left/right_shift

But this would let think that this operator operates only on integers
which is wrong as it already operates with std::ostream std::istream
from the standard library.

> * has_operator_complement could be has_operator_bit_not

Same comment although there is no class from the standard library that
defines this operator, right? but user classes could.

> * prefix_ could be pre_ and suffix_ could be post_ (e.g. pre_increment and
> post_increment)

I have no issue with that.

> BTW, could you in the documentation the list of operators that the library
> don't take care and why.

That is possible.

> I'm thinking to operators ',', '()', '&' (address),
> subscript . If I'm not wrong coma and address of could be implemented
> without issues

I decided to implement all traits that share a similar implementation.
',', '&' do not behave as other operators because there is always a
default operator for them. Therefore the implementation must be
different. I am not saying it cannot be implemented but it is
something different. I found already challenging to maintain these 37
operators with their specific behavior on fundamental types and
pointers (in particular I wrote a long list of tests for all of them).

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