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// duration
12
13// Test nested types
14
15// typedef Rep rep;
16// typedef Period period;
17
18#include <chrono>
19#include <ratio>
20#include <type_traits>
21
22#include "test_macros.h"
23
24int main(int, char**)
25{
26 typedef std::chrono::duration<long, std::ratio<3, 2> > D;
27 static_assert((std::is_same<D::rep, long>::value), "");
28 static_assert((std::is_same<D::period, std::ratio<3, 2> >::value), "");
29
30 return 0;
31}
32

source code of libcxx/test/std/time/time.duration/types.pass.cpp