[Insight-users] Explicit Instantiation question

Brad King brad.king at kitware.com
Mon Nov 5 14:50:26 EST 2007


Rupert Brooks wrote:
> Its worth mentioning that this g++ might be strange.  Its on a
> cluster, and so by default set up to compile and link in MPI
> libraries.  I've tried to eliminate that default and thus any
> interference that may cause, but who knows, there could be a
> configuration issue i am unaware of.
> 
> Like I said - i dont really expect an answer to this one.  Just reporting....
[snip]
> will compile and run without problems in Visual C++ 2003 and gcc 4.0.3
> on Ubuntu Linux.  However, with this gcc
> 
> [rbrooks at hn Release]$ g++ -v
> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
> --infodir=/usr/share/info --enable-shared --enable-threads=posix
> --disable-checking --with-system-zlib --enable-__cxa_atexit
> --host=i386-redhat-linux
> Thread model: posix
> gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
> [rbrooks at hn Release]$
> 
> compiling with the -O3 option causes the error below, which does NOT
> occur with -O2 or no -O option

That is certainly unusual.  I tried gcc 3.2.3 and still did not get the
error for a trivial test case:

template <class T> struct A
{
  void foo(T) {}
  void bar(T);
};
template class A<int>;

Do you get the error for this code?

-Brad


More information about the Insight-users mailing list