Archive: scoped_ptr.hpp:85: Invalid token in expression on solaris sparc compile, any hints


scoped_ptr.hpp:85: Invalid token in expression on solaris sparc compile, any hints
Hi,

When running "make"..yes, "make" not "Scons" ;) on SunOS 5.8 with NSIS 2.04 PrecompileExeheads I almost get everything compiled except the scoped_ptr.hpp.

Q: any tips would be welcome.

thissparc% make makensis
gcc -Wall -O3 -DCOMPRESS_MF_BT -c zlib/deflate.c -o ../build/zlib/deflate.o
gcc -Wall -O3 -DCOMPRESS_MF_BT -c zlib/trees.c -o ../build/zlib/trees.o
gcc -Wall -O3 -DCOMPRESS_MF_BT -c bzip2/blocksort.c -o ../build/bzip2/blocksort.o
gcc -Wall -O3 -DCOMPRESS_MF_BT -c bzip2/bzlib.c -o ../build/bzip2/bzlib.o
gcc -Wall -O3 -DCOMPRESS_MF_BT -c bzip2/compress.c -o ../build/bzip2/compress.o
gcc -Wall -O3 -DCOMPRESS_MF_BT -c bzip2/huffman.c -o ../build/bzip2/huffman.o
g++ -Wall -O3 -DCOMPRESS_MF_BT -c 7zip/7zGuids.cpp -o ../build/7zip/7zGuids.o
g++ -Wall -O3 -DCOMPRESS_MF_BT -c 7zip/Common/CRC.cpp -o ../build/7zip/Common/CRC.o
g++ -Wall -O3 -DCOMPRESS_MF_BT -c 7zip/7zip/Compress/LZ/LZInWindow.cpp -o ../build/7zip/7zip/Compress/LZ/LZInWindow.o
g++ -Wall -O3 -DCOMPRESS_MF_BT -c 7zip/7zip/Compress/LZMA/LZMAEncoder.cpp -o ../build/7zip/7zip/Compress/LZMA/LZMAEncoder.o
g++ -Wall -O3 -DCOMPRESS_MF_BT -c 7zip/7zip/Common/OutBuffer.cpp -o ../build/7zip/7zip/Common/OutBuffer.o
g++ -Wall -O3 -DCOMPRESS_MF_BT -c 7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp -o ../build/7zip/7zip/Compress/RangeCoder/RangeCoderBit.o
g++ -Wall -O3 -DCOMPRESS_MF_BT -c 7zip/Common/Alloc.cpp -o ../build/7zip/Common/Alloc.o
g++ -Wall -O3 -DCOMPRESS_MF_BT -c build.cpp -o ../build/build.o
In file included from util.h:13,
from build.cpp:9:
boost/scoped_ptr.hpp:85: Invalid token in expression
boost/scoped_ptr.hpp:92: Invalid token in expression
make: *** [../build/build.o] Error 1


Do you mind pasting the lines of code where the error is?


Just in the NSIS source as stated on lines 85 and 92

boost/scoped_ptr.hpp:85: Invalid token in expression
boost/scoped_ptr.hpp:92: Invalid token in expression

Below is the code anyhow...
----------------------------------------------------
// implicit conversion to "bool"

#if defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x530)

operator bool () const
{
return ptr != 0;
}

#elif defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
typedef T * (this_type::*unspecified_bool_type)() const;

operator unspecified_bool_type() const // never throws
{
return ptr == 0? 0: &this_type::get;
}

#else
typedef T * this_type::*unspecified_bool_type;

operator unspecified_bool_type() const // never throws
{
return ptr == 0? 0: &this_type::ptr;
}

#endif


I should look through the code where the macro BOOST_WORKAROUND(a, b) is defined, I'm sorry I don't have the time for it, maybe if you could find it...
I guess is that one who's giving the problem...:confused:


Thanks anyhow for looking into it. For now I've disabled the code and see if I can do a full makensis compile on SunOS.

If I'll finish my quest of creating Solaris Posix compliant makensis, I will create a Wiki with all the things one needs to do to make it work, in the mean time I see if code improvments will be merged with the CVS.