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 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::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::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::po