12 Feb
2009
12 Feb
'09
4:21 a.m.
Steven Watanabe wrote:
AMDG
Victor Whiskey Yankee wrote:
template
struct RegisterDerived { RegisterDerived(const KeyType& _key) { GenericFactory
::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