1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03, c++11, c++14, c++17
11 // constexpr common_iterator() requires default_initializable<I> = default;
16 #include "test_iterators.h"
21 using It
= cpp17_input_iterator
<int*>;
22 using CommonIt
= std::common_iterator
<It
, sentinel_wrapper
<It
>>;
23 static_assert(!std::is_default_constructible_v
<It
>); // premise
24 static_assert(!std::is_default_constructible_v
<CommonIt
>); // conclusion
27 // The base iterator is value-initialized.
28 std::common_iterator
<int*, sentinel_wrapper
<int*>> c
;
35 int main(int, char**) {
37 static_assert(test());