
17 Apr
2007
17 Apr
'07
8:11 a.m.
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.