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

source code of libcxx/test/std/time/time.point/time.point.cons/default.pass.cpp