singleton_pool compile error

Hi I'm trying to compile the sample code for singleton pool from http://www.boost.org/libs/pool/doc/interfaces.html just to learn how to use singleton pool. Here is the code. struct MyPoolTag { }; typedef boost::singleton_pool<MyPoolTag, sizeof(int)> my_pool; void func() { for (int i = 0; i < 10000; ++i) { int * const t = my_pool::malloc(); } my_pool::purge_memory(); } but I keep geting this error: Compiling... main.cpp c:\program files\microsoft visual studio\vc98\include\xmemory(59) : error C2248: 'object_creator' : cannot access private struct declared in class 'boost::details::pool::singleton_default<struct boost::singleton_pool<struct MyPoolTag,4,struct boost: :default_user_allocator_new_delete,class boost::details::pool::win32_mutex,32>::pool_type>' e:\lib\boost\boost\pool\detail\singleton.hpp(63) : see declaration of 'object_creator' c:\program files\microsoft visual studio\vc98\include\xmemory(59) : while compiling class-template static data member 'struct boost::details::pool::singleton_default<struct boost::singleton_pool<struct MyPoolTag,4,struct boost::default_user_ allocator_new_delete,class boost::details::pool::win32_mutex,32>::pool_type>::object_creator ol_type>::create_object' Error executing xicl6.exe. I'm using MS Visual C++ 6.0 SP5 on windows XP. What am I doing wrong ? Does anyone have a sample code for singleton pool that works on windows ? Thanks Nenad boost::details::pool::singleton_default<boost::singleton_pool<,4,boost::defa ult_user_allocator_new_delete,boost::details::pool::win32_mutex,32>::po

Hello ukropina, Thursday, March 18, 2004, 11:10:32 PM, you wrote: I'm using VC7.1 and boost 1.31.0 and everything works fine. -- Best regards, Владимир mailto:vkrasovsky@yandex.ru
participants (2)
-
ukropina@sfu.ca
-
Владимир Красовский