[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / iterators / predef.iterators / iterators.common / ctor.default.pass.cpp
blobb7b02be51f6dfac47b095f3aab22dca1ea59024a
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 // UNSUPPORTED: c++03, c++11, c++14, c++17
11 // constexpr common_iterator() requires default_initializable<I> = default;
13 #include <iterator>
14 #include <cassert>
16 #include "test_iterators.h"
18 constexpr bool test()
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;
29 assert(c == nullptr);
32 return true;
35 int main(int, char**) {
36 test();
37 static_assert(test());
39 return 0;