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// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
10
11// counted_iterator
12
13// Make sure that the implicitly-generated CTAD works.
14
15#include <iterator>
16
17#include "test_macros.h"
18
19int main(int, char**) {
20 int array[] = {1, 2, 3};
21 int* p = array;
22 std::counted_iterator iter(p, 3);
23 ASSERT_SAME_TYPE(decltype(iter), std::counted_iterator<int*>);
24
25 return 0;
26}
27

source code of libcxx/test/std/iterators/predef.iterators/counted.iterator/implicit_ctad.pass.cpp