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// test ratio: the absolute values of the template arguments N and D
10// shall be representable by type intmax_t.
11
12#include <ratio>
13#include <cstdint>
14
15int main(int, char**)
16{
17 const std::intmax_t t1 = std::ratio<1, 0x8000000000000000ULL>::num;
18
19 return 0;
20}
21

source code of libcxx/test/std/utilities/ratio/ratio.ratio/ratio3.compile.fail.cpp