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// 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
25int main(int, char**)
26{
27 typedef std::chrono::duration<int, Ratio<1> > D;
28 D d;
29
30 return 0;
31}
32

source code of libcxx/test/std/time/time.duration/ratio.compile.fail.cpp