summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/experimental
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2016-03-08 15:12:52 +0000
committerMarshall Clow <mclow.lists@gmail.com>2016-03-08 15:12:52 +0000
commit28cc4dde490655c2bc88d0328c73ed33615cc2a8 (patch)
tree919d1925993ad991d840091dbd725af54a649225 /libcxx/test/std/experimental
parentfacd697007d949d4e5696b093cfe193daa955727 (diff)
downloadbcm5719-llvm-28cc4dde490655c2bc88d0328c73ed33615cc2a8.tar.gz
bcm5719-llvm-28cc4dde490655c2bc88d0328c73ed33615cc2a8.zip
Implement P0253R1: Fixing a design mistake in the searchers interface.
llvm-svn: 262928
Diffstat (limited to 'libcxx/test/std/experimental')
-rw-r--r--libcxx/test/std/experimental/algorithms/alg.search/search.pass.cpp7
-rw-r--r--libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/default.pass.cpp2
-rw-r--r--libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp2
-rw-r--r--libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp2
-rw-r--r--libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp2
-rw-r--r--libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/default.pass.cpp2
-rw-r--r--libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp2
-rw-r--r--libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp2
-rw-r--r--libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp2
-rw-r--r--libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pass.cpp3
-rw-r--r--libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pred.pass.cpp3
11 files changed, 16 insertions, 13 deletions
diff --git a/libcxx/test/std/experimental/algorithms/alg.search/search.pass.cpp b/libcxx/test/std/experimental/algorithms/alg.search/search.pass.cpp
index 60a44e4c26a..579c13ddc4d 100644
--- a/libcxx/test/std/experimental/algorithms/alg.search/search.pass.cpp
+++ b/libcxx/test/std/experimental/algorithms/alg.search/search.pass.cpp
@@ -15,7 +15,7 @@
// ForwardIterator search(ForwardIterator first, ForwardIterator last,
// const Searcher& searcher);
//
-// returns searcher.operator(first, last)
+// returns searcher.operator(first, last).first
//
#include <experimental/algorithm>
@@ -27,10 +27,11 @@ int searcher_called = 0;
struct MySearcher {
template <typename Iterator>
- Iterator operator() ( Iterator b, Iterator /*e*/) const
+ std::pair<Iterator, Iterator>
+ operator() (Iterator b, Iterator e) const
{
++searcher_called;
- return b;
+ return std::make_pair(b, e);
}
};
diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/default.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/default.pass.cpp
index 7647b536aa9..4ef70c7cd87 100644
--- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/default.pass.cpp
+++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/default.pass.cpp
@@ -21,7 +21,7 @@
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
//
// template<class RandomAccessIterator2>
-// RandomAccessIterator2
+// pair<RandomAccessIterator2, RandomAccessIterator2>
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
//
// private:
diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp
index 1323044c870..1162ef66e24 100644
--- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp
+++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp
@@ -21,7 +21,7 @@
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
//
// template<class RandomAccessIterator2>
-// RandomAccessIterator2
+// pair<RandomAccessIterator2, RandomAccessIterator2>
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
//
// private:
diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp
index 8fd5b8c9f78..629a038663a 100644
--- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp
+++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp
@@ -21,7 +21,7 @@
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
//
// template<class RandomAccessIterator2>
-// RandomAccessIterator2
+// pair<RandomAccessIterator2, RandomAccessIterator2>
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
//
// private:
diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp
index d0655c82feb..9d29cb64e23 100644
--- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp
+++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp
@@ -21,7 +21,7 @@
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
//
// template<class RandomAccessIterator2>
-// RandomAccessIterator2
+// pair<RandomAccessIterator2, RandomAccessIterator2>
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
//
// private:
diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/default.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/default.pass.cpp
index af3bbbafb24..e4d1883c4c7 100644
--- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/default.pass.cpp
+++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/default.pass.cpp
@@ -21,7 +21,7 @@
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
//
// template<class RandomAccessIterator2>
-// RandomAccessIterator2
+// pair<RandomAccessIterator2, RandomAccessIterator2>
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
//
// private:
diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp
index ff289f0edeb..be116eccb21 100644
--- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp
+++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp
@@ -21,7 +21,7 @@
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
//
// template<class RandomAccessIterator2>
-// RandomAccessIterator2
+// pair<RandomAccessIterator2, RandomAccessIterator2>
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
//
// private:
diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp
index 1150210a978..d63acf08b33 100644
--- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp
+++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp
@@ -21,7 +21,7 @@
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
//
// template<class RandomAccessIterator2>
-// RandomAccessIterator2
+// pair<RandomAccessIterator2, RandomAccessIterator2>
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
//
// private:
diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp
index 55426874abe..3cd41c7054f 100644
--- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp
+++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp
@@ -21,7 +21,7 @@
// Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());
//
// template<class RandomAccessIterator2>
-// RandomAccessIterator2
+// pair<RandomAccessIterator2, RandomAccessIterator2>
// operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
//
// private:
diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pass.cpp
index 446dcbde42b..a2dbceb7fbb 100644
--- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pass.cpp
+++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pass.cpp
@@ -20,7 +20,8 @@
// : __first_(__f), __last_(__l), __pred_(__p) {}
//
// 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_);
// }
//
diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pred.pass.cpp
index b65c500c319..e951b4613dd 100644
--- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pred.pass.cpp
+++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pred.pass.cpp
@@ -20,7 +20,8 @@
// : __first_(__f), __last_(__l), __pred_(__p) {}
//
// 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_);
// }
//
OpenPOWER on IntegriCloud