blob: 20298b772cb5cfac2a807df356dc893ee6085947 [file] [log] [blame]
Howard Hinnant94b2dd02010-08-22 00:59:46 +00001//===----------------------------------------------------------------------===//
2//
Chandler Carruth57b08b02019-01-19 10:56:40 +00003// 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
Howard Hinnant94b2dd02010-08-22 00:59:46 +00006//
7//===----------------------------------------------------------------------===//
8
9// <chrono>
10
11// duration
12
13// Period shall be a specialization of ratio, diagnostic required.
14
15#include <chrono>
16
17template <int N, int D = 1>
18class Ratio
19{
20public:
21 static const int num = N;
22 static const int den = D;
23};
24
JF Bastien2df59c52019-02-04 20:31:13 +000025int main(int, char**)
Howard Hinnant94b2dd02010-08-22 00:59:46 +000026{
27 typedef std::chrono::duration<int, Ratio<1> > D;
28 D d;
JF Bastien2df59c52019-02-04 20:31:13 +000029
30 return 0;
Howard Hinnant94b2dd02010-08-22 00:59:46 +000031}