
11 Feb
2009
11 Feb
'09
9:21 p.m.
Steven Watanabe wrote:
AMDG
Victor Whiskey Yankee wrote:
template <typename BaseType, typename KeyType, typename DerivedType> struct RegisterDerived { RegisterDerived(const KeyType& _key) {
GenericFactory<BaseType,KeyType>::instance().registrator<DerivedType>(_key)
This should be ...::instance().template registrator<DerivedType>(_key)
Is compiles now. Thanks! I guess the "thread safe singleton" recipe is having difficulty. It fails a boost assertion in method static T& instance() trying to return *t when ask for an instance of "z" in the test main. Interesting finding. If I move the myARestistrar and myBRegistrar to be inside main, then everything works. But must auto-register. -Vic