1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 // <iterator>
10
11 // template <class T, size_t N> T* begin(T (&array)[N]);
12
13 #include <iterator>
14 #include <cassert>
15
16 #include "test_macros.h"
17
main(int,char **)18 int main(int, char**)
19 {
20 int ia[] = {1, 2, 3};
21 int* i = std::begin(ia);
22 assert(*i == 1);
23 *i = 2;
24 assert(ia[0] == 2);
25
26 return 0;
27 }
28