Blitz logo

Blitz Support :

From: Paul Floyd (paul.floyd_at_[hidden])
Date: 2004-11-23 16:56:02


Julian C. Cummings wrote:
> Hi Paul,
>
> You've done the right thing as far as modifying the configure script to look
> for a compiler-specific header sun/bzconfig.h. The compile error you got
> below seems to indicate that something is wrong with the declaration of the
> std::iterator_traits<T> template. This should be in the compiler's
> <iterator> header. You might try preprocessing the globals.cpp file just to
> see if the declaration of iterator_traits is being included. I don't think
> I have access to this compiler, so I may not be able to help you much more
> beyond this. It's possible that special compiler options are needed with
> Sun's CC to get it to behave in an ANSI standard way. I will be happy to
> patch blitz with support for this compiler once this issue is resolved.
>

Hi Julian

With a bit of help on the developers.sun.com Studio fora, I figured out
the cause.

The problem is with the Solaris C++ runtime library. This has to be
backards compatible with older OSes and compilers, so it is built with
basically not a lot of C++ features. So even if the compiler has all of
the features (which Studio 9 has, almost) you can't use them to compile
stuff in the std namespace. So it can't do a partial specialization of
std::iterator_traits.

The workaround is to use the -library=stlport4 option.

A+
Paul