xref: /llvm-project/libcxx/test/std/time/time.duration/positive_num.compile.fail.cpp (revision 7738db2c06b177fe916ac1bcf3633449b3c1fca9)
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::num shall be positive, diagnostic required.
14 
15 #include <chrono>
16 
main(int,char **)17 int main(int, char**)
18 {
19     typedef std::chrono::duration<int, std::ratio<5, -1> > D;
20     D d;
21 
22   return 0;
23 }
24