+2007-11-25 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1_impl/array (array<>::_M_check): Remove, not necessary
+ anymore.
+ (array<>::at): Adjust.
+
+ * docs/html/17_intro/c++0x_status.html: Fix array::data entry.
+
2007-11-25 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_algobase.h (__lexicographical_compare<>::__lc):
reference
at(size_type __n)
- {
- _M_check<_Nm>(__n);
+ {
+ if (__builtin_expect(__n >= _Nm, false))
+ std::__throw_out_of_range(__N("array::at"));
return _M_instance[__n];
}
const_reference
at(size_type __n) const
{
- _M_check<_Nm>(__n);
+ if (__builtin_expect(__n >= _Nm, false))
+ std::__throw_out_of_range(__N("array::at"));
return _M_instance[__n];
}
const _Tp*
data() const
{ return &_M_instance[0]; }
-
- private:
- template<std::size_t _Mm>
- typename __gnu_cxx::__enable_if<_Mm, void>::__type
- _M_check(size_type __n) const
- {
- if (__builtin_expect(__n >= _Mm, false))
- std::__throw_out_of_range(__N("array::_M_check"));
- }
-
- // Avoid "unsigned comparison with zero" warnings.
- template<std::size_t _Mm>
- typename __gnu_cxx::__enable_if<!_Mm, void>::__type
- _M_check(size_type) const
- { std::__throw_out_of_range(__N("array::_M_check")); }
};
// Array comparisons.