mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 18:38:30 +08:00
Implement P0253R1: Fixing a design mistake in the searchers interface.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@262928 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1421,20 +1421,20 @@ is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
|||||||
// search
|
// search
|
||||||
|
|
||||||
template <class _BinaryPredicate, class _ForwardIterator1, class _ForwardIterator2>
|
template <class _BinaryPredicate, class _ForwardIterator1, class _ForwardIterator2>
|
||||||
_ForwardIterator1
|
pair<_ForwardIterator1, _ForwardIterator1>
|
||||||
__search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
__search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
||||||
_ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __pred,
|
_ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __pred,
|
||||||
forward_iterator_tag, forward_iterator_tag)
|
forward_iterator_tag, forward_iterator_tag)
|
||||||
{
|
{
|
||||||
if (__first2 == __last2)
|
if (__first2 == __last2)
|
||||||
return __first1; // Everything matches an empty sequence
|
return make_pair(__first1, __first1); // Everything matches an empty sequence
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
// Find first element in sequence 1 that matchs *__first2, with a mininum of loop checks
|
// Find first element in sequence 1 that matchs *__first2, with a mininum of loop checks
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
if (__first1 == __last1) // return __last1 if no element matches *__first2
|
if (__first1 == __last1) // return __last1 if no element matches *__first2
|
||||||
return __last1;
|
return make_pair(__last1, __last1);
|
||||||
if (__pred(*__first1, *__first2))
|
if (__pred(*__first1, *__first2))
|
||||||
break;
|
break;
|
||||||
++__first1;
|
++__first1;
|
||||||
@@ -1445,9 +1445,9 @@ __search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
|||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
if (++__m2 == __last2) // If pattern exhausted, __first1 is the answer (works for 1 element pattern)
|
if (++__m2 == __last2) // If pattern exhausted, __first1 is the answer (works for 1 element pattern)
|
||||||
return __first1;
|
return make_pair(__first1, __m1);
|
||||||
if (++__m1 == __last1) // Otherwise if source exhaused, pattern not found
|
if (++__m1 == __last1) // Otherwise if source exhaused, pattern not found
|
||||||
return __last1;
|
return make_pair(__last1, __last1);
|
||||||
if (!__pred(*__m1, *__m2)) // if there is a mismatch, restart with a new __first1
|
if (!__pred(*__m1, *__m2)) // if there is a mismatch, restart with a new __first1
|
||||||
{
|
{
|
||||||
++__first1;
|
++__first1;
|
||||||
@@ -1458,20 +1458,21 @@ __search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class _BinaryPredicate, class _RandomAccessIterator1, class _RandomAccessIterator2>
|
template <class _BinaryPredicate, class _RandomAccessIterator1, class _RandomAccessIterator2>
|
||||||
_LIBCPP_CONSTEXPR_AFTER_CXX11 _RandomAccessIterator1
|
_LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||||
|
pair<_RandomAccessIterator1, _RandomAccessIterator1>
|
||||||
__search(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1,
|
__search(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1,
|
||||||
_RandomAccessIterator2 __first2, _RandomAccessIterator2 __last2, _BinaryPredicate __pred,
|
_RandomAccessIterator2 __first2, _RandomAccessIterator2 __last2, _BinaryPredicate __pred,
|
||||||
random_access_iterator_tag, random_access_iterator_tag)
|
random_access_iterator_tag, random_access_iterator_tag)
|
||||||
{
|
{
|
||||||
typedef typename std::iterator_traits<_RandomAccessIterator1>::difference_type _D1;
|
typedef typename iterator_traits<_RandomAccessIterator1>::difference_type _D1;
|
||||||
typedef typename std::iterator_traits<_RandomAccessIterator2>::difference_type _D2;
|
typedef typename iterator_traits<_RandomAccessIterator2>::difference_type _D2;
|
||||||
// Take advantage of knowing source and pattern lengths. Stop short when source is smaller than pattern
|
// Take advantage of knowing source and pattern lengths. Stop short when source is smaller than pattern
|
||||||
_D2 __len2 = __last2 - __first2;
|
const _D2 __len2 = __last2 - __first2;
|
||||||
if (__len2 == 0)
|
if (__len2 == 0)
|
||||||
return __first1;
|
return make_pair(__first1, __first1);
|
||||||
_D1 __len1 = __last1 - __first1;
|
const _D1 __len1 = __last1 - __first1;
|
||||||
if (__len1 < __len2)
|
if (__len1 < __len2)
|
||||||
return __last1;
|
return make_pair(__last1, __last1);
|
||||||
const _RandomAccessIterator1 __s = __last1 - (__len2 - 1); // Start of pattern match can't go beyond here
|
const _RandomAccessIterator1 __s = __last1 - (__len2 - 1); // Start of pattern match can't go beyond here
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
@@ -1479,7 +1480,7 @@ __search(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1,
|
|||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
if (__first1 == __s)
|
if (__first1 == __s)
|
||||||
return __last1;
|
return make_pair(__last1, __last1);
|
||||||
if (__pred(*__first1, *__first2))
|
if (__pred(*__first1, *__first2))
|
||||||
break;
|
break;
|
||||||
++__first1;
|
++__first1;
|
||||||
@@ -1511,7 +1512,7 @@ __search(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1,
|
|||||||
if (__pred(*__first1, *__first2))
|
if (__pred(*__first1, *__first2))
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
return __last1;
|
return make_pair(__last1, __last1);
|
||||||
}
|
}
|
||||||
__phase2:
|
__phase2:
|
||||||
#endif // !_LIBCPP_UNROLL_LOOPS
|
#endif // !_LIBCPP_UNROLL_LOOPS
|
||||||
@@ -1521,7 +1522,7 @@ __search(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1,
|
|||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
if (++__m2 == __last2)
|
if (++__m2 == __last2)
|
||||||
return __first1;
|
return make_pair(__first1, __first1 + __len2);
|
||||||
++__m1; // no need to check range on __m1 because __s guarantees we have enough source
|
++__m1; // no need to check range on __m1 because __s guarantees we have enough source
|
||||||
if (!__pred(*__m1, *__m2))
|
if (!__pred(*__m1, *__m2))
|
||||||
{
|
{
|
||||||
@@ -1561,7 +1562,7 @@ __search(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1,
|
|||||||
if (!__pred(*__m1, *__m2))
|
if (!__pred(*__m1, *__m2))
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
return __first1;
|
return make_pair(__first1, __first1 + __len2);
|
||||||
}
|
}
|
||||||
__continue:
|
__continue:
|
||||||
++__first1;
|
++__first1;
|
||||||
@@ -1577,8 +1578,9 @@ search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
|||||||
{
|
{
|
||||||
return _VSTD::__search<typename add_lvalue_reference<_BinaryPredicate>::type>
|
return _VSTD::__search<typename add_lvalue_reference<_BinaryPredicate>::type>
|
||||||
(__first1, __last1, __first2, __last2, __pred,
|
(__first1, __last1, __first2, __last2, __pred,
|
||||||
typename std::iterator_traits<_ForwardIterator1>::iterator_category(),
|
typename iterator_traits<_ForwardIterator1>::iterator_category(),
|
||||||
typename std::iterator_traits<_ForwardIterator2>::iterator_category());
|
typename iterator_traits<_ForwardIterator2>::iterator_category())
|
||||||
|
.first;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class _ForwardIterator1, class _ForwardIterator2>
|
template <class _ForwardIterator1, class _ForwardIterator2>
|
||||||
@@ -1587,8 +1589,8 @@ _ForwardIterator1
|
|||||||
search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
||||||
_ForwardIterator2 __first2, _ForwardIterator2 __last2)
|
_ForwardIterator2 __first2, _ForwardIterator2 __last2)
|
||||||
{
|
{
|
||||||
typedef typename std::iterator_traits<_ForwardIterator1>::value_type __v1;
|
typedef typename iterator_traits<_ForwardIterator1>::value_type __v1;
|
||||||
typedef typename std::iterator_traits<_ForwardIterator2>::value_type __v2;
|
typedef typename iterator_traits<_ForwardIterator2>::value_type __v2;
|
||||||
return _VSTD::search(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>());
|
return _VSTD::search(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -53,7 +53,7 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS
|
|||||||
template <class _ForwardIterator, class _Searcher>
|
template <class _ForwardIterator, class _Searcher>
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
_ForwardIterator search(_ForwardIterator __f, _ForwardIterator __l, const _Searcher &__s)
|
_ForwardIterator search(_ForwardIterator __f, _ForwardIterator __l, const _Searcher &__s)
|
||||||
{ return __s(__f, __l); }
|
{ return __s(__f, __l).first; }
|
||||||
|
|
||||||
|
|
||||||
template <class _PopulationIterator, class _SampleIterator, class _Distance,
|
template <class _PopulationIterator, class _SampleIterator, class _Distance,
|
||||||
|
@@ -119,9 +119,12 @@ public:
|
|||||||
|
|
||||||
template <typename _ForwardIterator2>
|
template <typename _ForwardIterator2>
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
_ForwardIterator2 operator () (_ForwardIterator2 __f, _ForwardIterator2 __l) const
|
pair<_ForwardIterator2, _ForwardIterator2>
|
||||||
|
operator () (_ForwardIterator2 __f, _ForwardIterator2 __l) const
|
||||||
{
|
{
|
||||||
return _VSTD::search(__f, __l, __first_, __last_, __pred_);
|
return _VSTD::__search(__f, __l, __first_, __last_, __pred_,
|
||||||
|
typename _VSTD::iterator_traits<_ForwardIterator>::iterator_category(),
|
||||||
|
typename _VSTD::iterator_traits<_ForwardIterator2>::iterator_category());
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -233,7 +236,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename _RandomAccessIterator2>
|
template <typename _RandomAccessIterator2>
|
||||||
_RandomAccessIterator2
|
pair<_RandomAccessIterator2, _RandomAccessIterator2>
|
||||||
operator ()(_RandomAccessIterator2 __f, _RandomAccessIterator2 __l) const
|
operator ()(_RandomAccessIterator2 __f, _RandomAccessIterator2 __l) const
|
||||||
{
|
{
|
||||||
static_assert ( std::is_same<
|
static_assert ( std::is_same<
|
||||||
@@ -242,12 +245,12 @@ public:
|
|||||||
>::value,
|
>::value,
|
||||||
"Corpus and Pattern iterators must point to the same type" );
|
"Corpus and Pattern iterators must point to the same type" );
|
||||||
|
|
||||||
if (__f == __l ) return __l; // empty corpus
|
if (__f == __l ) return make_pair(__l, __l); // empty corpus
|
||||||
if (__first_ == __last_) return __f; // empty pattern
|
if (__first_ == __last_) return make_pair(__f, __f); // empty pattern
|
||||||
|
|
||||||
// If the pattern is larger than the corpus, we can't find it!
|
// If the pattern is larger than the corpus, we can't find it!
|
||||||
if ( __pattern_length_ > _VSTD::distance (__f, __l))
|
if ( __pattern_length_ > _VSTD::distance (__f, __l))
|
||||||
return __l;
|
return make_pair(__l, __l);
|
||||||
|
|
||||||
// Do the search
|
// Do the search
|
||||||
return this->__search(__f, __l);
|
return this->__search(__f, __l);
|
||||||
@@ -262,7 +265,8 @@ public: // TODO private:
|
|||||||
shared_ptr<vector<difference_type>> __suffix_;
|
shared_ptr<vector<difference_type>> __suffix_;
|
||||||
|
|
||||||
template <typename _RandomAccessIterator2>
|
template <typename _RandomAccessIterator2>
|
||||||
_RandomAccessIterator2 __search(_RandomAccessIterator2 __f, _RandomAccessIterator2 __l) const
|
pair<_RandomAccessIterator2, _RandomAccessIterator2>
|
||||||
|
__search(_RandomAccessIterator2 __f, _RandomAccessIterator2 __l) const
|
||||||
{
|
{
|
||||||
_RandomAccessIterator2 __cur = __f;
|
_RandomAccessIterator2 __cur = __f;
|
||||||
const _RandomAccessIterator2 __last = __l - __pattern_length_;
|
const _RandomAccessIterator2 __last = __l - __pattern_length_;
|
||||||
@@ -278,7 +282,7 @@ public: // TODO private:
|
|||||||
__j--;
|
__j--;
|
||||||
// We matched - we're done!
|
// We matched - we're done!
|
||||||
if ( __j == 0 )
|
if ( __j == 0 )
|
||||||
return __cur;
|
return make_pair(__cur, __cur + __pattern_length_);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Since we didn't match, figure out how far to skip forward
|
// Since we didn't match, figure out how far to skip forward
|
||||||
@@ -290,7 +294,7 @@ public: // TODO private:
|
|||||||
__cur += __suffix[ __j ];
|
__cur += __suffix[ __j ];
|
||||||
}
|
}
|
||||||
|
|
||||||
return __l; // We didn't find anything
|
return make_pair(__l, __l); // We didn't find anything
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -384,8 +388,8 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename _RandomAccessIterator2>
|
template <typename _RandomAccessIterator2>
|
||||||
_RandomAccessIterator2
|
pair<_RandomAccessIterator2, _RandomAccessIterator2>
|
||||||
operator ()(_RandomAccessIterator2 __f, _RandomAccessIterator2 __l) const
|
operator ()(_RandomAccessIterator2 __f, _RandomAccessIterator2 __l) const
|
||||||
{
|
{
|
||||||
static_assert ( std::is_same<
|
static_assert ( std::is_same<
|
||||||
@@ -394,12 +398,12 @@ public:
|
|||||||
>::value,
|
>::value,
|
||||||
"Corpus and Pattern iterators must point to the same type" );
|
"Corpus and Pattern iterators must point to the same type" );
|
||||||
|
|
||||||
if (__f == __l ) return __l; // empty corpus
|
if (__f == __l ) return make_pair(__l, __l); // empty corpus
|
||||||
if (__first_ == __last_) return __f; // empty pattern
|
if (__first_ == __last_) return make_pair(__f, __f); // empty pattern
|
||||||
|
|
||||||
// If the pattern is larger than the corpus, we can't find it!
|
// If the pattern is larger than the corpus, we can't find it!
|
||||||
if ( __pattern_length_ > _VSTD::distance (__f, __l))
|
if ( __pattern_length_ > _VSTD::distance (__f, __l))
|
||||||
return __l;
|
return make_pair(__l, __l);
|
||||||
|
|
||||||
// Do the search
|
// Do the search
|
||||||
return this->__search(__f, __l);
|
return this->__search(__f, __l);
|
||||||
@@ -413,7 +417,8 @@ private:
|
|||||||
shared_ptr<skip_table_type> __skip_;
|
shared_ptr<skip_table_type> __skip_;
|
||||||
|
|
||||||
template <typename _RandomAccessIterator2>
|
template <typename _RandomAccessIterator2>
|
||||||
_RandomAccessIterator2 __search ( _RandomAccessIterator2 __f, _RandomAccessIterator2 __l ) const {
|
pair<_RandomAccessIterator2, _RandomAccessIterator2>
|
||||||
|
__search ( _RandomAccessIterator2 __f, _RandomAccessIterator2 __l ) const {
|
||||||
_RandomAccessIterator2 __cur = __f;
|
_RandomAccessIterator2 __cur = __f;
|
||||||
const _RandomAccessIterator2 __last = __l - __pattern_length_;
|
const _RandomAccessIterator2 __last = __l - __pattern_length_;
|
||||||
const skip_table_type & __skip = *__skip_.get();
|
const skip_table_type & __skip = *__skip_.get();
|
||||||
@@ -427,12 +432,12 @@ private:
|
|||||||
__j--;
|
__j--;
|
||||||
// We matched - we're done!
|
// We matched - we're done!
|
||||||
if ( __j == 0 )
|
if ( __j == 0 )
|
||||||
return __cur;
|
return make_pair(__cur, __cur + __pattern_length_);
|
||||||
}
|
}
|
||||||
__cur += __skip[__cur[__pattern_length_-1]];
|
__cur += __skip[__cur[__pattern_length_-1]];
|
||||||
}
|
}
|
||||||
|
|
||||||
return __l;
|
return make_pair(__l, __l);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -982,7 +982,7 @@ __str_find(const _CharT *__p, _SizeT __sz,
|
|||||||
const _CharT* __r =
|
const _CharT* __r =
|
||||||
_VSTD::__search(__p + __pos, __p + __sz,
|
_VSTD::__search(__p + __pos, __p + __sz,
|
||||||
__s, __s + __n, _Traits::eq,
|
__s, __s + __n, _Traits::eq,
|
||||||
random_access_iterator_tag(), random_access_iterator_tag());
|
random_access_iterator_tag(), random_access_iterator_tag()).first;
|
||||||
if (__r == __p + __sz)
|
if (__r == __p + __sz)
|
||||||
return __npos;
|
return __npos;
|
||||||
return static_cast<_SizeT>(__r - __p);
|
return static_cast<_SizeT>(__r - __p);
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
// ForwardIterator search(ForwardIterator first, ForwardIterator last,
|
// ForwardIterator search(ForwardIterator first, ForwardIterator last,
|
||||||
// const Searcher& searcher);
|
// const Searcher& searcher);
|
||||||
//
|
//
|
||||||
// returns searcher.operator(first, last)
|
// returns searcher.operator(first, last).first
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <experimental/algorithm>
|
#include <experimental/algorithm>
|
||||||
@@ -27,10 +27,11 @@ int searcher_called = 0;
|
|||||||
|
|
||||||
struct MySearcher {
|
struct MySearcher {
|
||||||
template <typename Iterator>
|
template <typename Iterator>
|
||||||
Iterator operator() ( Iterator b, Iterator /*e*/) const
|
std::pair<Iterator, Iterator>
|
||||||
|
operator() (Iterator b, Iterator e) const
|
||||||
{
|
{
|
||||||
++searcher_called;
|
++searcher_called;
|
||||||
return b;
|
return std::make_pair(b, e);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
|
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
|
||||||
//
|
//
|
||||||
// template<class RandomAccessIterator2>
|
// template<class RandomAccessIterator2>
|
||||||
// RandomAccessIterator2
|
// pair<RandomAccessIterator2, RandomAccessIterator2>
|
||||||
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
|
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
|
||||||
//
|
//
|
||||||
// private:
|
// private:
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
|
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
|
||||||
//
|
//
|
||||||
// template<class RandomAccessIterator2>
|
// template<class RandomAccessIterator2>
|
||||||
// RandomAccessIterator2
|
// pair<RandomAccessIterator2, RandomAccessIterator2>
|
||||||
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
|
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
|
||||||
//
|
//
|
||||||
// private:
|
// private:
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
|
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
|
||||||
//
|
//
|
||||||
// template<class RandomAccessIterator2>
|
// template<class RandomAccessIterator2>
|
||||||
// RandomAccessIterator2
|
// pair<RandomAccessIterator2, RandomAccessIterator2>
|
||||||
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
|
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
|
||||||
//
|
//
|
||||||
// private:
|
// private:
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
|
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
|
||||||
//
|
//
|
||||||
// template<class RandomAccessIterator2>
|
// template<class RandomAccessIterator2>
|
||||||
// RandomAccessIterator2
|
// pair<RandomAccessIterator2, RandomAccessIterator2>
|
||||||
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
|
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
|
||||||
//
|
//
|
||||||
// private:
|
// private:
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
|
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
|
||||||
//
|
//
|
||||||
// template<class RandomAccessIterator2>
|
// template<class RandomAccessIterator2>
|
||||||
// RandomAccessIterator2
|
// pair<RandomAccessIterator2, RandomAccessIterator2>
|
||||||
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
|
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
|
||||||
//
|
//
|
||||||
// private:
|
// private:
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
|
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
|
||||||
//
|
//
|
||||||
// template<class RandomAccessIterator2>
|
// template<class RandomAccessIterator2>
|
||||||
// RandomAccessIterator2
|
// pair<RandomAccessIterator2, RandomAccessIterator2>
|
||||||
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
|
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
|
||||||
//
|
//
|
||||||
// private:
|
// private:
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
|
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
|
||||||
//
|
//
|
||||||
// template<class RandomAccessIterator2>
|
// template<class RandomAccessIterator2>
|
||||||
// RandomAccessIterator2
|
// pair<RandomAccessIterator2, RandomAccessIterator2>
|
||||||
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
|
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
|
||||||
//
|
//
|
||||||
// private:
|
// private:
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
|
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
|
||||||
//
|
//
|
||||||
// template<class RandomAccessIterator2>
|
// template<class RandomAccessIterator2>
|
||||||
// RandomAccessIterator2
|
// pair<RandomAccessIterator2, RandomAccessIterator2>
|
||||||
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
|
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
|
||||||
//
|
//
|
||||||
// private:
|
// private:
|
||||||
|
@@ -20,7 +20,8 @@
|
|||||||
// : __first_(__f), __last_(__l), __pred_(__p) {}
|
// : __first_(__f), __last_(__l), __pred_(__p) {}
|
||||||
//
|
//
|
||||||
// template <typename _ForwardIterator2>
|
// template <typename _ForwardIterator2>
|
||||||
// _ForwardIterator2 operator () (_ForwardIterator2 __f, _ForwardIterator2 __l) const {
|
// pair<_ForwardIterator2, _ForwardIterator2>
|
||||||
|
// operator () (_ForwardIterator2 __f, _ForwardIterator2 __l) const {
|
||||||
// return std::search(__f, __l, __first_, __last_, __pred_);
|
// return std::search(__f, __l, __first_, __last_, __pred_);
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
|
@@ -20,7 +20,8 @@
|
|||||||
// : __first_(__f), __last_(__l), __pred_(__p) {}
|
// : __first_(__f), __last_(__l), __pred_(__p) {}
|
||||||
//
|
//
|
||||||
// template <typename _ForwardIterator2>
|
// template <typename _ForwardIterator2>
|
||||||
// _ForwardIterator2 operator () (_ForwardIterator2 __f, _ForwardIterator2 __l) const {
|
// pair<_ForwardIterator2, _ForwardIterator2>
|
||||||
|
// operator () (_ForwardIterator2 __f, _ForwardIterator2 __l) const {
|
||||||
// return std::search(__f, __l, __first_, __last_, __pred_);
|
// return std::search(__f, __l, __first_, __last_, __pred_);
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
|
@@ -86,7 +86,7 @@
|
|||||||
<tr><td><a href="http://wg21.link/P0005R4">P0005R4</a></td><td>LWG</td><td>Adopt not_fn from Library Fundamentals 2 for C++17</td><td>Jacksonville</td><td></td><td></td></tr>
|
<tr><td><a href="http://wg21.link/P0005R4">P0005R4</a></td><td>LWG</td><td>Adopt not_fn from Library Fundamentals 2 for C++17</td><td>Jacksonville</td><td></td><td></td></tr>
|
||||||
<tr><td><a href="http://wg21.link/P0152R1">P0152R1</a></td><td>LWG</td><td>constexpr atomic::is_always_lock_free</td><td>Jacksonville</td><td></td><td></td></tr>
|
<tr><td><a href="http://wg21.link/P0152R1">P0152R1</a></td><td>LWG</td><td>constexpr atomic::is_always_lock_free</td><td>Jacksonville</td><td></td><td></td></tr>
|
||||||
<tr><td><a href="http://wg21.link/P0185R1">P0185R1</a></td><td>LWG</td><td>Adding [nothrow-]swappable traits</td><td>Jacksonville</td><td></td><td></td></tr>
|
<tr><td><a href="http://wg21.link/P0185R1">P0185R1</a></td><td>LWG</td><td>Adding [nothrow-]swappable traits</td><td>Jacksonville</td><td></td><td></td></tr>
|
||||||
<tr><td><a href="http://wg21.link/P0253R1">P0253R1</a></td><td>LWG</td><td>Fixing a design mistake in the searchers interface</td><td>Jacksonville</td><td></td><td></td></tr>
|
<tr><td><a href="http://wg21.link/P0253R1">P0253R1</a></td><td>LWG</td><td>Fixing a design mistake in the searchers interface</td><td>Jacksonville</td><td>Complete</td><td>3.9</td></tr>
|
||||||
<tr><td><a href="http://wg21.link/P0025R0">P0025R0</a></td><td>LWG</td><td>An algorithm to "clamp" a value between a pair of boundary values</td><td>Jacksonville</td><td>Complete</td><td>3.9</td></tr>
|
<tr><td><a href="http://wg21.link/P0025R0">P0025R0</a></td><td>LWG</td><td>An algorithm to "clamp" a value between a pair of boundary values</td><td>Jacksonville</td><td>Complete</td><td>3.9</td></tr>
|
||||||
<tr><td><a href="http://wg21.link/P0154R1">P0154R1</a></td><td>LWG</td><td>constexpr std::hardware_{constructive,destructive}_interference_size</td><td>Jacksonville</td><td></td><td></td></tr>
|
<tr><td><a href="http://wg21.link/P0154R1">P0154R1</a></td><td>LWG</td><td>constexpr std::hardware_{constructive,destructive}_interference_size</td><td>Jacksonville</td><td></td><td></td></tr>
|
||||||
<tr><td><a href="http://wg21.link/P0030R1">P0030R1</a></td><td>LWG</td><td>Proposal to Introduce a 3-Argument Overload to std::hypot</td><td>Jacksonville</td><td></td><td></td></tr>
|
<tr><td><a href="http://wg21.link/P0030R1">P0030R1</a></td><td>LWG</td><td>Proposal to Introduce a 3-Argument Overload to std::hypot</td><td>Jacksonville</td><td></td><td></td></tr>
|
||||||
|
Reference in New Issue
Block a user