33 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: c++03, c++11, c++14, c++1710 11// struct default_sentinel_t;12// inline constexpr default_sentinel_t default_sentinel;13 14#include <iterator>15 16#include <concepts>17#include <type_traits>18 19#include "test_macros.h"20 21int main(int, char**) {22 static_assert(std::is_empty_v<std::default_sentinel_t>);23 static_assert(std::semiregular<std::default_sentinel_t>);24 25 static_assert(std::same_as<decltype(std::default_sentinel), const std::default_sentinel_t>);26 27 std::default_sentinel_t s1;28 auto s2 = std::default_sentinel_t{};29 s2 = s1;30 31 return 0;32}33