2012-03-05 52 views
0

的烃源代码是这样的:我使用升压1.3.0在Visual Studio 6.0

#include <boost/pool/singleton_pool.hpp> 
struct pool_tag{ }; 
typedef singleton_pool<pool_tag,sizeof(int)> 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>' 

我不知道如何解决它能够有人帮助我?

+0

OT,但为什么你还在使用Visual Studio 6.0?使用更新的版本你会更好。有免费的VS的Express版本。 – Bart 2012-03-05 14:08:45

回答

1

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

如果你可以升级到VC7.1以及它肯定会工作。

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