C++ 我在VisualStudio6.0中使用Boost1.3.0

C++ 我在VisualStudio6.0中使用Boost1.3.0,c++,C++,源代码如下所示: #include <boost/pool/singleton_pool.hpp> struct pool_tag{ }; typedef singleton_pool<pool_tag,sizeof(int)> sml; void main() { int *m=(int *)sml::malloc(); } #包括 结构池_标记{}; typedef singleton_池sml; void main() { int*m=(int*)sml

源代码如下所示:

#include <boost/pool/singleton_pool.hpp>
struct pool_tag{ };
typedef singleton_pool<pool_tag,sizeof(int)> sml;

void main()
{
    int *m=(int *)sml::malloc();
}
#包括
结构池_标记{};
typedef singleton_池sml;
void main()
{
int*m=(int*)sml::malloc();
}
错误是:

error C2248: 'object_creator' : cannot access private struct declared in class 
   'boost::details::pool::singleton_default<
       struct boost::singleton_pool<struct pool_tag,4,
       struct boost::default_user_allocator_new_delete,
       class boost::details::pool::win32_mutex,32>::pool_type>'
错误C2248:“对象\u创建者”:无法访问类中声明的私有结构
'boost::details::pool::singleton\u默认值<
结构boost::singleton\u pool::pool\u type>'

我不知道如何修复它?有人能帮我吗?

从Boost邮件列表线程,尝试升级到至少Boost 1.3.1

如果你也能升级到VC7.1,那么它肯定能工作


另一个邮件列表线程提到,Boost开发人员在2002年试图确定错误,但没有进一步说明。

OT,但为什么您仍然使用Visual Studio 6.0?如果有一个更新的版本,你会过得更好。有免费的VS速成版。