desktop wrote:
I the C++ standard page 472 it says that an associative container can
be constructed like X(i,j,c) where i and j are input iterators to
elements. But in the implementation there is no constructor that
matches this requirement, the only constructors are:
public:
// allocation/deallocation
_Rb_tree()
{ }
_Rb_tree(const _Compare& __comp)
: _M_impl(allocator_type(), __comp)
{ }
_Rb_tree(const _Compare& __comp, const allocator_type& __a)
: _M_impl(__a, __comp)
{ }
_Rb_tree(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare,
_Alloc>& __x)
: _M_impl(__x.get_allocator(), __x._M_impl._M_key_compare)
{
if (__x._M_root() != 0)
{
_M_root() = _M_copy(__x._M_begin(), _M_end());
_M_leftmost() = _S_minimum(_M_root());
_M_rightmost() = _S_maximum(_M_root());
_M_impl._M_node_count = __x._M_impl._M_node_count;
}
}
~_Rb_tree()
{ _M_erase(_M_begin()); }
How does the implementation meet this requirement when the constructor
is not implemented?
Nowhere in any part of the standard does it mention the class _Rb_tree,
much less that it satisfies the requirements for an associative container.
_Rb_tree is at most an implementation detail of your specific
implementation. There isn't much of a compelling reason to be digging
around through it unless you are observing some specific incorrect
behavior in your implementation.