//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 // UNSUPPORTED: no-filesystem, no-localization, no-tzdb // XFAIL: libcpp-has-no-experimental-tzdb // XFAIL: availability-tzdb-missing // // template // class zoned_time; // // zoned_time(); #include #include #include #include "../test_offset_time_zone.h" // Verify the results of the default constructed object, // and whether the constructor's constraints are satisfied. int main(int, char**) { { static_assert(std::default_initializable>); std::chrono::zoned_time zt; assert(zt.get_time_zone() == std::chrono::locate_zone("UTC")); assert(zt.get_sys_time() == std::chrono::sys_seconds{}); } static_assert(!std::default_initializable< std::chrono::zoned_time>>); { using type = offset_time_zone; static_assert(std::default_initializable>); std::chrono::zoned_time zt; assert(zt.get_time_zone().offset() == std::chrono::seconds{0}); assert(zt.get_sys_time() == std::chrono::sys_seconds{}); } static_assert( !std::default_initializable< std::chrono::zoned_time>>); { using type = offset_time_zone; static_assert(std::default_initializable>); std::chrono::zoned_time zt; assert(zt.get_time_zone().offset() == std::chrono::seconds{0}); assert(zt.get_sys_time() == std::chrono::sys_seconds{}); } return 0; }