I think that a const is missing for the '->' of SmartPtr's LockedStorage policy .
Code Snippet:
int main()
{
const Loki::SmartPtr<MyClass, Loki::COMRefCounted,
Loki::DisallowConversion,
Loki::NoCheck,
Loki::LockedStorage>
sp( new MyClass );
sp->doSomething(); // compilation breaks
}
// gcc 3.4.4
int SmartPtr.h, line 19, the '->' does not have the const keyword.
If I check other policies, they all have the const.
main.cpp
Sorry, I sent my email too fast.
My impression is that the const is missing. Based on my experiments, it fixes my problem
without adding side-effects.
But I would like to know if there were reason(s) to not have this const.
Thanks, Patrick.
I think the const is missing due to simple oversight. I will take a look at this one.
Thanks for letting us know!
Rich
Fixed in revision 1021.
Added const qualifier to operator->,