Loki wont compile under Sun Studio

http://sourceforge.net/projects/loki-lib/

I haven't had a trouble compiling software using the Loki Library in Microsoft Visual Studio 2005 in Windows XP and gcc using cygwin and solaris. I haven't been able to get it to compile using the CC compile from Sun Studio 11.

"/export/home/root/Programming/loki-0.1.5/include/loki/SmartPtr.h", line 1490: Error: Partial specialization parameter OP is not used in the arguments.

"/export/home/root/Programming/loki-0.1.5/include/loki/SmartPtr.h", line 1490: Error: Partial specialization parameter KP is not used in the arguments.

"/export/home/root/Programming/loki-0.1.5/include/loki/SmartPtr.h", line 1490: Error: Partial specialization parameter SP is not used in the arguments.

"/export/home/root/Programming/loki-0.1.5/include/loki/SmartPtr.h", line 1490: Error: Partial specialization parameter CNP is not used in the arguments.

4 Error(s) detected.

"/export/home/root/Programming/loki-0.1.5/include/loki/SmartPtr.h", line 1490: Error: Partial specialization parameter OP is not used in the arguments.

"/export/home/root/Programming/loki-0.1.5/include/loki/SmartPtr.h", line 1490: Error: Partial specialization parameter KP is not used in the arguments.

"/export/home/root/Programming/loki-0.1.5/include/loki/SmartPtr.h", line 1490: Error: Partial specialization parameter SP is not used in the arguments.

"/export/home/root/Programming/loki-0.1.5/include/loki/SmartPtr.h", line 1490: Error: Partial specialization parameter CNP is not used in the arguments.

"/export/home/root/Programming/loki-0.1.5/include/loki/StrongPtr.h", line 1455: Error: Partial specialization parameter KP is not used in the arguments.

"/export/home/root/Programming/loki-0.1.5/include/loki/StrongPtr.h", line 1455: Error: Partial specialization parameter RP is not used in the arguments.

"/export/home/root/Programming/loki-0.1.5/include/loki/StrongPtr.h", line 1455: Error: Partial specialization parameter DP is not used in the arguments.

"/export/home/root/Programming/loki-0.1.5/include/loki/StrongPtr.h", line 1455: Error: Partial specialization parameter CNP is not used in the arguments.

8 Error(s) detected.

"/export/home/root/Programming/loki-0.1.5/include/loki/SmartPtr.h", line 1490: Error: Partial specialization parameter OP is not used in the arguments.

"/export/home/root/Programming/loki-0.1.5/include/loki/SmartPtr.h", line 1490: Error: Partial specialization parameter KP is not used in the arguments.

"/export/home/root/Programming/loki-0.1.5/include/loki/SmartPtr.h", line 1490: Error: Partial specialization parameter SP is not used in the arguments.

"/export/home/root/Programming/loki-0.1.5/include/loki/SmartPtr.h", line 1490: Error: Partial specialization parameter CNP is not used in the arguments.

The Loki developers think it might be a problem with the compiler (since there isn't trouble with MSVC and gcc).

The code in question is below

template

<

typename T,

template <class> class OP,

class CP,

template <class> class KP,

template <class> class SP,

template <class> class CNP,

typename U

>

inline bool operator>=(const SmartPtr<T, OP, CP, KP, SP, CNP >& lhs,

U* rhs)

{ return !(lhs < rhs); }

template

<

typename T,

template <class> class OP,

class CP,

template <class> class KP,

template <class> class SP,

template <class> class CNP,

typename U

>

inline bool operator>=(U* lhs,

const SmartPtr<T, OP, CP, KP, SP, CNP >& rhs)

{ return !(lhs < rhs); }

I know this is kind of vague. Has anyone else tried to use Loki with Sun Studio?

Message was edited by:

nivenfres

[3925 byte] By [nivenfres] at [2007-11-26 11:16:44]
# 1

Take a look at my blog http://blogs.sun.com/sga/category/Loki. As I know Sun Studio 11 cannot compile Loki library. All necessary fix are implemented in the Sun Studio Express (http://developers.sun.com/prodtech/cc/downloads/express.jsp) only. But if you have a service contract you can escalate this problem and get a fix.

Atanasyan at 2007-7-7 3:31:49 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2
I just submitted the problem through my service contract.https://osc-amer.sun.com/OSCSW/svcportal?pageName=SRSubmitConfirmation&even tSrc=getcasedetail&command=no_command&caseArrayNoInRetSet=-1&service RequestNumber=65218551&caseSearchStatus=openAndClosed
nivenfres at 2007-7-7 3:31:49 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3

Hi

> The Loki developers think it might be a problem with

> the compiler (since there isn't trouble with MSVC and

> gcc).

> I know this is kind of vague. Has anyone else tried

> to use Loki with Sun Studio?

As already said, there is a problem with the compiler. It will build OK with Sun Studio Express. Saying that there are no problems with MSVC and g++ is a bit disengenuous. They both have plenty of defects. Loki is written to fit those defects (or workarounds are supplied, in the case of MSVC).

Paul

Paul_Floyd at 2007-7-7 3:31:49 > top of Java-index,Development Tools,Solaris and Linux Development Tools...