Subject: [Boost-bugs] [Boost C++ Libraries] #3536: ptr_map doesn't support incomplete type with view clone allocator
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-10-21 15:35:01
#3536: ptr_map doesn't support incomplete type with view clone allocator
----------------------------------+-----------------------------------------
Reporter: olafvdspek@⦠| Owner:
Type: Bugs | Status: new
Milestone: Boost 1.41.0 | Component: None
Version: Boost 1.40.0 | Severity: Problem
Keywords: |
----------------------------------+-----------------------------------------
{{{
#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'
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3536> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC