|
Boost : |
From: John Maddock (john_at_[hidden])
Date: 2007-04-17 05:04:00
Grégory Pakosz wrote:
> Hello,
>
> I'm currently having a look at boost's type traits implementation.
> At the moment, I'm curious about is_enum. Can please someone explain
> me
> why add_reference is applied before testing convertibility to
> int_convertible ???
The class needs to declare an object of type T, and then try and see if it
converts or not... but you may not be able to declare an object of type T
(for example T may be abstract), where as you an always declare a reference
to T, and the conversion rules work the same.
HTH, John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk