positive_num.fail.cpp 581 B

1234567891011121314151617181920212223
  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. // <chrono>
  9. // duration
  10. // Period::num shall be positive, diagnostic required.
  11. #include <chrono>
  12. int main(int, char**)
  13. {
  14. typedef std::chrono::duration<int, std::ratio<5, -1> > D;
  15. D d;
  16. return 0;
  17. }