summaryrefslogtreecommitdiffstats
path: root/libcxx/test/utilities/tuple/tuple.tuple/tuple.range/begin.pass.cpp
blob: 9bab42e3241bf3fad08b4c97162d951dcb5f562a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//===----------------------------------------------------------------------===//
//
// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

// <tuple>

// template <class... Types> class tuple;

// template <class InputIterator>
//   InputIterator begin(const tuple<InputIterator, InputIterator>& t);

// template <class InputIterator>
//   InputIterator end(const tuple<InputIterator, InputIterator>& t);

#include <tuple>
#include <iterator>
#include <cassert>

int main()
{
    {
        typedef std::tuple<int*, int*> T;
        int array[5] = {0, 1, 2, 3, 4};
        const T t(std::begin(array), std::end(array));
        assert(begin(t) == std::begin(array));
        assert(end(t) == std::end(array));
    }
}
OpenPOWER on IntegriCloud