On 21/01/15 23:30 +0100, François Dumont wrote:
+#if __cplusplus > 201103L
+      template<typename _Kt>
+       std::pair<iterator, iterator>
+       equal_range(const _Kt& __x)
+       {
+         std::pair<_Base_iterator, _Base_iterator> __res =
+           _Base::equal_range(__x);
+         return std::make_pair(iterator(__res.first, this),
+                               iterator(__res.second, this));
+       }

BTW, this is C++14 code, what's wrong with:

 template<typename _Kt>
   std::pair<const_iterator, const_iterator>
   equal_range(const _Kt& __x) const
   {
     auto __res = _Base::equal_range(__x);
     return { iterator(__res.first, this), iterator(__res.second, this) };
   }

Or even:

 template<typename _Kt>
   std::pair<const_iterator, const_iterator>
   equal_range(const _Kt& __x) const
   {
     auto __res = _Base::equal_range(__x);
     return { { __res.first, this }, {__res.second, this} };
   }

Reply via email to