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 //===----------------------------------------------------------------------===// 8 9 // <chrono> 10 11 // time_point 12 13 // time_point(); 14 15 #include <chrono> 16 #include <cassert> 17 18 #include "test_macros.h" 19 #include "../../rep.h" 20 main(int,char **)21int main(int, char**) 22 { 23 typedef std::chrono::system_clock Clock; 24 typedef std::chrono::duration<Rep, std::milli> Duration; 25 { 26 std::chrono::time_point<Clock, Duration> t; 27 assert(t.time_since_epoch() == Duration::zero()); 28 } 29 #if TEST_STD_VER > 11 30 { 31 constexpr std::chrono::time_point<Clock, Duration> t; 32 static_assert(t.time_since_epoch() == Duration::zero(), ""); 33 } 34 #endif 35 36 return 0; 37 } 38