- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
dynamic_cast fails on standard template type with OS X Intel C++ compiler but works fine with Intel Linux or Windows C++ compilers as well as with GNU gcc and Windows Visual Studio.
Here is a simple program that demonstrates the bug:
[cpp]#includeint main(int argc, char *argv[]) { std::ostringstream ss; std::ostream &stream = ss; std::ostringstream &ref = dynamic_cast<:OSTRINGSTREAM>(stream); return 0; } [/cpp]
The above code should not throw 'std::bad_cast' at run-time.
Compiler version:icpc (ICC) 11.1 20100401
Command line:icpc -o test test.cpp
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It looks like it's a problem unique to 10.6 (Snow Leopard). I'll investigate and see what I can figure out. I'll post here with any updates.
Thanks!
Dale
Thanks!
Dale

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