[PowerPC][NFC] Cleanup PPCCTRLoopsVerify pass
[llvm-project.git] / libcxx / test / std / iterators / iterator.range / begin_array.pass.cpp
blob2d69d7118a97ee5cb3a9e245655ed2e08fcb930a
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 //===----------------------------------------------------------------------===//
9 // <iterator>
11 // template <class T, size_t N> T* begin(T (&array)[N]);
13 #include <iterator>
14 #include <cassert>
16 #include "test_macros.h"
18 int main(int, char**)
20 int ia[] = {1, 2, 3};
21 int* i = std::begin(ia);
22 assert(*i == 1);
23 *i = 2;
24 assert(ia[0] == 2);
26 return 0;