- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
this code does not compile with icc11 however is valid c++
it compiles with msvc versions 7, 7.1 & 8
previous discussion: http://software.intel.com/en-us/forums/showthread.php?t=70491
it compiles with msvc versions 7, 7.1 & 8
[cpp]#includetemplate struct s; template<> struct s {}; template<> struct s : public s {}; struct Int : public s {}; template void foo(const s &) { std::cout << "in foo(const s<" << typeid(type).name() << ">&)n"; } int main() { Int i; foo(i); //here an error appears return 0; }[/cpp]
previous discussion: http://software.intel.com/en-us/forums/showthread.php?t=70491
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - de666
this code does not compile with icc11 however is valid c++
it compiles with msvc versions 7, 7.1 & 8
previous discussion: http://software.intel.com/en-us/forums/showthread.php?t=70491
it compiles with msvc versions 7, 7.1 & 8
[cpp]#includetemplate struct s; template<> struct s {}; template<> struct s : public s {}; struct Int : public s {}; template void foo(const s &) { std::cout << "in foo(const s<" << typeid(type).name() << ">&)n"; } int main() { Int i; foo(i); //here an error appears return 0; }[/cpp]
previous discussion: http://software.intel.com/en-us/forums/showthread.php?t=70491
this is the same issue as in the previous discussion (link above)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok
let's continue in the old thread
you may want to delete this one
let's continue in the old thread
you may want to delete this one

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