#include <boost/ptr_container/ptr_map.hpp>
class C;
int main()
{
boost::ptr_map<int, C, boost::view_clone_allocator> c;
return 0;
}
boost\checked_delete.hpp(32) : error C2027: use of undefined type 'C'
c:\documents and settings\internet\my documents\visual studio 2008\projects\test\test.cpp(3) : see declaration of 'C'
boost\ptr_container\clone_allocator.hpp(56) : see reference to function template instantiation 'void boost::checked_delete<const T>(T *)' being compiled
with
[
T=C
]
boost\ptr_container\clone_allocator.hpp(74) : see reference to function template instantiation 'void boost::delete_clone<U>(const T *)' being compiled
with
[
U=C,
T=C
]
boost\ptr_container\detail\reversible_ptr_container.hpp(126) : see reference to function template instantiation 'void boost::heap_clone_allocator::deallocate_clone<C>(const U *)' being compiled
with
[
U=C
]
boost\ptr_container\detail\reversible_ptr_container.hpp(119) : while compiling class template member function 'void boost::ptr_container_detail::reversible_ptr_container<Config,CloneAllocator>::null_clone_allocator<allow_null_values>::deallocate_clone(const C *)'
with
[
Config=boost::ptr_container_detail::map_config<C,std::map<int,void *,boost::view_clone_allocator,std::allocator<std::pair<const int,void *>>>,true>,
CloneAllocator=boost::heap_clone_allocator,
allow_null_values=false
]
boost\ptr_container\detail\reversible_ptr_container.hpp(276) : see reference to class template instantiation 'boost::ptr_container_detail::reversible_ptr_container<Config,CloneAllocator>::null_clone_allocator<allow_null_values>' being compiled
with
[
Config=boost::ptr_container_detail::map_config<C,std::map<int,void *,boost::view_clone_allocator,std::allocator<std::pair<const int,void *>>>,true>,
CloneAllocator=boost::heap_clone_allocator,
allow_null_values=false
]
boost\ptr_container\detail\reversible_ptr_container.hpp(275) : while compiling class template member function 'void boost::ptr_container_detail::reversible_ptr_container<Config,CloneAllocator>::null_policy_deallocate_clone(const C *)'
with
[
Config=boost::ptr_container_detail::map_config<C,std::map<int,void *,boost::view_clone_allocator,std::allocator<std::pair<const int,void *>>>,true>,
CloneAllocator=boost::heap_clone_allocator
]
boost\ptr_container\detail\associative_ptr_container.hpp(34) : see reference to class template instantiation 'boost::ptr_container_detail::reversible_ptr_container<Config,CloneAllocator>' being compiled
with
[
Config=boost::ptr_container_detail::map_config<C,std::map<int,void *,boost::view_clone_allocator,std::allocator<std::pair<const int,void *>>>,true>,
CloneAllocator=boost::heap_clone_allocator
]
boost\ptr_container\ptr_map_adapter.hpp(130) : see reference to class template instantiation 'boost::ptr_container_detail::associative_ptr_container<Config,CloneAllocator>' being compiled
with
[
Config=boost::ptr_container_detail::map_config<C,std::map<int,void *,boost::view_clone_allocator,std::allocator<std::pair<const int,void *>>>,true>,
CloneAllocator=boost::heap_clone_allocator
]
boost\ptr_container\ptr_map_adapter.hpp(388) : see reference to class template instantiation 'boost::ptr_container_detail::ptr_map_adapter_base<T,VoidPtrMap,CloneAllocator,Ordered>' being compiled
with
[
T=C,
VoidPtrMap=std::map<int,void *,boost::view_clone_allocator,std::allocator<std::pair<const int,void *>>>,
CloneAllocator=boost::heap_clone_allocator,
Ordered=true
]
boost\ptr_container\ptr_map.hpp(36) : see reference to class template instantiation 'boost::ptr_map_adapter<T,VoidPtrMap,CloneAllocator>' being compiled
with
[
T=C,
VoidPtrMap=std::map<int,void *,boost::view_clone_allocator,std::allocator<std::pair<const int,void *>>>,
CloneAllocator=boost::heap_clone_allocator
]
c:\documents and settings\internet\my documents\visual studio 2008\projects\test\test.cpp(7) : see reference to class template instantiation 'boost::ptr_map<Key,T,Compare>' being compiled
with
[
Key=int,
T=C,
Compare=boost::view_clone_allocator
]
boost\checked_delete.hpp(32) : error C2118: negative subscript
boost\checked_delete.hpp(34) : warning C4150: deletion of pointer to incomplete type 'C'; no destructor called
c:\documents and settings\internet\my documents\visual studio 2008\projects\test\test.cpp(3) : see declaration of 'C'
Check the template arguments for ptr_map.
You're passing view_clone_allocator as Compare instead of as CloneAllocator.