2012-03-05 10 views
0

Visual Studioでこのような源泉コードブースト1.3.0を使用します。エラーがある私は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

答えて

1

Boostメーリングリストのスレッドhereより、少なくともBoost 1.3.1にアップグレードしてください。

また、VC7.1にアップグレードすることができれば、間違いなく動作します。

もう1つのメーリングリストのスレッドhereには、Boost Developersが2002年にエラーを特定しようとしているが、何も言及していないことが記載されています。