duration.fail.cpp 646 B

123456789101112131415161718192021222324
  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. // If a program instantiates duration with a duration type for the template
  11. // argument Rep a diagnostic is required.
  12. #include <chrono>
  13. int main(int, char**)
  14. {
  15. typedef std::chrono::duration<std::chrono::milliseconds> D;
  16. D d;
  17. return 0;
  18. }