Intel® C++ Compiler

icc V 8.0 Function Template Problem ?

Hi,

icc V 8.0 (icc -ansi -o foo tempfunc.cpp) with -ansi produces
the following error msg:

tempfunc.cpp(34): error: no instance of function template "foofunction" matches the argument list
argument types are: (foo , int )
foofunction(lhs,tag);
^
detected during instantiation of "void assign(foo &far, int) [with T1=double, D1=3U]"

When compiling:

template
class foo {
public:
foo() {}
~foo() {}
};

template
static void foofunction(foo& lhs, int tag)
{ }

Installation of icc on debian

Hello,

I have a little problem of installation of icc on debian. I followed the instructions from:

http://colt.projectgamma.com/intel/ixc-debian.html

icc run fines except that I have some seg faults which looks like:

(gdb) bt
#0 0x402762d5 in _ZNSt6_WinitC9Ev () from /opt/intel_cc_80/lib/libcprts.so.5

I did a quick google search and found another post here:

undefined reference to vtable for 'AbsNode'

Hello All,

I am trying to compile and link a C++application using intel compiler on Linux platform. This application compiles and links fine when gcc is used.

When I use icc, all the files compile without any problem, but gives the following errorat the link time:
xyz.so: undefined reference to 'vtable for AbsNode'
xyz.so: undefined reference to 'vtable for ParScan'
There are about 18 of the above lines referring to different classes.

compiler bug: NaN

it seems that ICL8.0 has serious problems with NaN when compiling in release mode (even with optimization OFF...):
all options are default debug/release for a VC7.1 console project. VC7.1 btw always gives correct values.


#include

#include
int main()
{
const double x = std::numeric_limits::quiet_NaN();
double d = atof( "3.14" );
std::cout <<
#ifdef _DEBUG
"DEBUG
";
#else
"RELEASE
";
#endif

std::cout << x << ' ' << d << '
';

compile head file error! stddef.h(84)...

I use ICC 8.048 compile xvid 1.0.1, has follow error:

Compiling with Intel C++ 8.0 ...
quant_h263.c
C:Program FilesMicrosoft Visual Studio .NET 2003Vc7includestddef.h(84): error: invalid combination of type specifiers
typedef _W64 int intptr_t;
^
...

at stddef.h(84):
...
#ifndef _INTPTR_T_DEFINED
#ifdef _WIN64
typedef __int64 intptr_t;
#else
typedef _W64 int intptr_t;<--- has error
#endif
#define _INTPTR_T_DEFINED
#endif
...

why?

type qualifier on return type is meaningless

Hello,

So far icc gave really good results. It has by default some nice flags (-Wshadow from gcc ...). But on the other hand there is one warning I don't quite follow:

warning #858: type qualifier on return type is meaningless

Here is an example to reproduce(*). If you uncomment those lines and try to compile it with gcc:

g++ -ansi -pedantic -Wall foo.cpp

It does not produce any warnings. Furthermore I do believe that const can be usefull for instance in this case. Is this correct or do I misunderstood something ?

nested friend classes

I would like to do this:

class A
{
private:
class B{};
class C
{
private:
B myB;
};
};

I'd like to do this without making B and C public. (because the reason they're nested in the first case is to make it so only A can see them.)

Is there a way to permit C to instantiate B?

I tried this:

class A
{
private:
class C;
class B
{
friend class A::C;
}
class C
{
friend class A::B;
private:

Subscribe to Intel® C++ Compiler