Boost logo

Boost :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2008-06-12 07:55:44


Hello,

currently these tests fail with

"../boost/ptr_container/ptr_set_adapter.hpp", line 362: error #2309: more
than one instance of constructor
"boost::ptr_container_detail::ptr_set_adapter_base<Key, VoidPtrSet,
CloneAllocator, Ordered>::ptr_set_adapter_base [with Key=Base,
VoidPtrSet=std::set<void *, boost::void_ptr_indirect_fun<std::less<Base>,
Base, Base>, std::allocator<void *>>,
CloneAllocator=boost::heap_clone_allocator, Ordered=true]" matches the
argument list:
             function template
"boost::ptr_container_detail::ptr_set_adapter_base<Key, VoidPtrSet,
CloneAllocator, Ordered>::ptr_set_adapter_base(const Compare &, const
Allocator &) [with Key=Base, VoidPtrSet=std::set<void *,
boost::void_ptr_indirect_fun<std::less<Base>, Base, Base>,
std::allocator<void *>>, CloneAllocator=boost::heap_clone_allocator,
Ordered=true]"
             function template
"boost::ptr_container_detail::ptr_set_adapter_base<Key, VoidPtrSet,
CloneAllocator, Ordered>::ptr_set_adapter_base(InputIterator,
InputIterator) [with Key=Base, VoidPtrSet=std::set<void *,
boost::void_ptr_indirect_fun<std::less<Base>, Base, Base>,
std::allocator<void *>>, CloneAllocator=boost::heap_clone_allocator,
Ordered=true]"
             argument types are:
(boost::void_ptr_iterator<__rw::__rw_tree_iter<void *, ptrdiff_t, void
*const *, void *const &, __rw::__rw_rb_tree_node<std::allocator<void *>,
void *, void *, __rw::__ident<void *, void *>>>, Base>,
boost::void_ptr_iterator<__rw::__rw_tree_iter<void *, ptrdiff_t, void
*const *, void *const &, __rw::__rw_rb_tree_node<std::allocator<void *>,
void *, void *, __rw::__ident<void *, void *>>>, Base>)
            : base_type( first, last )

The compilers has difficulties choosing between:

         template< class Compare, class Allocator >
         ptr_set_adapter_base( const Compare& comp,
                               const Allocator& a )

and

         template< class InputIterator >
         ptr_set_adapter_base( InputIterator first, InputIterator last )

Interestingly, if I just remove the following constructors, these tests
pass for me on Cxx, and no other failures are introduced.

         template< class Compare, class Allocator >
         ptr_set_adapter_base( const Compare& comp,
                               const Allocator& a )

         template< class Compare, class Allocator >
         associative_ptr_container( const Compare& comp,
                                    const Allocator& a )

So are these constructors needed at all?

Markus


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk