SmartPtr.cpp and StrongPtr.cpp don't compile with gcc 3.3.3
(I had no problems with newer gcc releases.)
The error is:
g++ -Wall -Wold-style-cast -Wundef -Wsign-compare -Wconversion -Wpointer-arith -pedantic -g -O2 -I../include -DNDEBUG -c -o StrongPtr.o StrongPtr.cpp
In file included from ../include/loki/StrongPtr.h:20,
../include/loki/SmartPtr.h: In member function `bool Loki::SmartPtr<T,
OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy,
ConstnessPolicy>::Merge(Loki::SmartPtr<T1, OP1, CP1, KP1, SP1, CNP1>&)':
../include/loki/SmartPtr.h:1317: error: syntax error before `;' token
make: *** [StrongPtr.o] Fehler 1
Is a workaround possible?
Thank you and best regards
This gets mentioned from time to time on Loki's forums. Enough that perhaps I should add a comment to the StrongPtr.h and SmartPtr.h header files saying what to do if you see this error.
You see, the Merge function only gets used with ownership policies that implement the co-pointers as circular linked lists. The Merge functions merely combine two related circular lists into one larger one. The other ownership policies do not need a Merge function. So perhaps you're using SmartPtr and StrongPtr with a different ownership policy and calling Merge.
I recommend reviewing your code to see if you need the Merge function.
Hope that helps.