- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08/26/2006Hi,#include
The following bit of code compiles fine with gcc 3.3 or later, but has
problems with the Intel C++ compiler version 9.1, which produces the
following error message.
Is this a compiler bug, or is there something wrong with the code?
If the former, I'd be grateful for suggestions of a workaround, and if
the latter, please tell me what I'm doing wrong.
Note that the corresponding version with no templates compiles without
problems.
Thanks in advance. Faheem.**************************************************************************
icpc -o foo.o -c -Wall -Werror -g -wd383,810,981,1418 cxxlib-icc
-DBOOST_RAND -I/usr/local/include/boost-1_33_1 foo.cpp
foo.cpp(12): error: no operator "=" matches these operands operand
types are: boost::function> =
choice = &rchoice;
^
*************************************************************
*************************************************************************
template
int rchoice()
{
return 1;
}
templateint foo(void)
{
boost::functionchoice;
choice = &rchoice;
return choice();
}
int main()
{
return foo<2>();
}
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
thanks for the information.Can you please specify the build date of the 9.1 compiler you use ? I will look into it asap ...
thanks for the information.Can you please specify the build date of the 9.1 compiler you use ? I will look into it asap ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I could reproduce the problem even with the latest 9.1 version.
Please give me some more time to investigate what the root cause of the problem is.
I could reproduce the problem even with the latest 9.1 version.
Please give me some more time to investigate what the root cause of the problem is.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mario,
Thanks.
Feel free to contact me directly at my email address for further information if necessary.
You probably don't need the version number, but if you do it is
icc --version
icc (ICC) 9.1 20060707
Faheem.
Thanks.
Feel free to contact me directly at my email address for further information if necessary.
You probably don't need the version number, but if you do it is
icc --version
icc (ICC) 9.1 20060707
Faheem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Faheem,
where do I find your email adress ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mario,
I thought you'd have access to it since you work for Intel and I had to put it in to register.
Anyway, here it is, faheem@email.unc.edu.
Faheem Mitha.
I thought you'd have access to it since you work for Intel and I had to put it in to register.
Anyway, here it is, faheem@email.unc.edu.
Faheem Mitha.
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