2014-02-25 2 views
0

fast_pool_allocator에 두 개 이상의 템플릿 매개 변수가 있기 때문에 표준 할당 자 대신 boost::fast_pool_allocator을 사용하려고합니다. 다른 부스트 라이브러리와 함께 작동하지 않습니다. std::allocator과 호환 가능하며 최초의 것을 제외한 모든 것은 기본값을가집니다.std :: allocator 대신 boost :: fast_pool_allocator 사용

하나의 템플릿 매개 변수가 필요한 클래스 템플릿으로 전달하려고합니다. 특정 오류 :

error: type/value mismatch at argument 3 in template parameter list for "template<class Point, template<class, class> class Container, template<class> class Allocator> class boost::geometry::model::multi_point" 

error: expected a template of type "template<class> class Allocator", got "template<class T, class UserAllocator, class Mutex, unsigned int NextSize, unsigned int MaxSize> class boost::fast_pool_allocator" 

실제로 작동시키는 방법이 있습니까?

+0

Boost.Geometry와 같은 소리가 들리지 않습니다. 나는 버그를 신청할 것이다. –

답변

4

는 C++ 11을 사용하지 않는 경우에도 작동하는 대신 boost::fast_pool_allocator

template <class T> 
using fast_pool_allocator_t = boost::fast_pool_allocator<T>; 

이 다음과 같은 템플릿을 사용합니다.

template <class T> 
struct fast_pool_allocator_t : boost::fast_pool_allocator<T> 
{ }; 
관련 문제