- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using Intel Fortran and C++ 11.1 update 5 on RHE 4.1 and getting a problem with the limit template (we had no such problems when compiling the same code on RHE 3 andgcc 320 and Intel 10.1). I wondered if anyone has run into this problem before and might haveany tips or suggestions please?
/usr/include/c++/3.4.6/limits(292): error #54: too few arguments in macro invocation
static _Tp max() throw() { return static_cast(0); }
^
/usr/include/c++/3.4.6/limits(292): error: expected an identifier
static _Tp max() throw() { return static_cast(0); }
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Since this is strictly a C++ question, I'll transfer this to our C++ Forum to see if they have an answer.
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Ron!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Besides the traditional Windows
#undef max
(which seems a likely solution, given the unexpected reference to a macro)
I've had C++ apps where changing max to std::max was required, because the application got a different max from another namespace. For example, Ct has exhibited such conflicts. I'd like to see that one resolved by experts, but I guess we can't count on that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you! That was it - we had re-defined max ourselves. Now you point it out, its fairly obvious :-)
I wonderhow many others have run into this - seems a bit bad that gcc defines max itself, since defining your own max is fairly common for C++ programmers.....
Thanks!
Tony

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