summaryrefslogtreecommitdiffstats
path: root/libcxx/test/utilities/utility/pairs/pair.range/end.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/utilities/utility/pairs/pair.range/end.pass.cpp')
-rw-r--r--libcxx/test/utilities/utility/pairs/pair.range/end.pass.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/libcxx/test/utilities/utility/pairs/pair.range/end.pass.cpp b/libcxx/test/utilities/utility/pairs/pair.range/end.pass.cpp
new file mode 100644
index 00000000000..b1d8dacee3e
--- /dev/null
+++ b/libcxx/test/utilities/utility/pairs/pair.range/end.pass.cpp
@@ -0,0 +1,30 @@
+//===----------------------------------------------------------------------===//
+//
+// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <utility>
+
+// template <class T1, class T2> struct pair
+
+// template <class InputIterator>
+// InputIterator
+// end(const std::pair<InputIterator, InputIterator>& p);
+
+#include <utility>
+#include <iterator>
+#include <cassert>
+
+int main()
+{
+ {
+ typedef std::pair<int*, int*> P;
+ int a[3] = {0};
+ P p(std::begin(a), std::end(a));
+ assert(std::end(p) == a+3);
+ }
+}
OpenPOWER on IntegriCloud