
4 Mar
2005
4 Mar
'05
9:37 a.m.
I can't get the singleton to work with VC70. The error message is \boost\singleton\creators.hpp(171): error C2504: 'boost::singleton::detail::longevity_registry<Unused>' : base class undefined with [ Unused=void ] My code looks like: struct manipidx { manipidx() : idx(std::ios_base::xalloc()) { } int idx; }; typedef basic_singleton<manipidx> tmanipidx; int main() { std::cout << tmanipidx::pointer()->idx << std::endl; } What I'm trying to do is to create a global variable that can be used in all instanses of a template and at the same time avoid the need for a .cpp file.