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 // XFAIL: libcpp-has-no-experimental-tzdb
24 // - The members are present as non-const members.
25 // - The struct is an aggregate.
29 #include <type_traits>
31 int main(int, const char**) {
32 static_assert(std::is_aggregate_v
<std::chrono::sys_info
>);
34 std::chrono::sys_info sys_info
{
35 .begin
= std::chrono::sys_seconds::min(),
36 .end
= std::chrono::sys_seconds::max(),
37 .offset
= std::chrono::seconds(0),
38 .save
= std::chrono::minutes(0),
41 [[maybe_unused
]] std::chrono::sys_seconds
& begin
= sys_info
.begin
;
42 [[maybe_unused
]] std::chrono::sys_seconds
& end
= sys_info
.end
;
43 [[maybe_unused
]] std::chrono::seconds
& offset
= sys_info
.offset
;
44 [[maybe_unused
]] std::chrono::minutes
& save
= sys_info
.save
;
45 [[maybe_unused
]] std::string
& abbrev
= sys_info
.abbrev
;