- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can't login to Premier Support, so... Could someone file a bug report about this for me? The following code works when compiled with Visual Studio 2012 (v.11.0), but it fails with Intel C++ Composer XE 2013 (v.13.0.089).
[cpp]
#include <type_traits>
enum Fruit { apple, orange };
template <typename T>
typename std::enable_if< std::is_enum<T>::value,
typename std::underlying_type<T>::type& >::type underlying(T& enumValue)
{
return reinterpret_cast< std::underlying_type<T>::type& >(enumValue);
}
int main()
{
static_assert(std::is_enum<Fruit>::value, "");
Fruit fruit;
++underlying(fruit);
return 0;
}
// error : no instance of function template "underlying" matches the argument list
// argument types are: (Fruit)
// ++underlying(fruit);
// ^
[/cpp]
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page