|
Boost : |
From: Grégory Pakosz (gpakosz_at_[hidden])
Date: 2007-04-17 04:11:17
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 ???
Trying to find more information about how to detect enum types, I only
found this reference
http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/898b98475c804f5b/0e6e68dd917ff1fb?hl=en&
where it's explained that "An enum is a user-defined type that is
convertible to int without an user-defined conversion (and two
user-defined conversions in a row are illegal, so you can detect that)."
Thank you.
Regards,
Gregory.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk