rep03.fail.cpp 613 B

12345678910111213141516171819202122232425
  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. // template <class Rep2>
  11. // explicit duration(const Rep2& r);
  12. // treat_as_floating_point<Rep2>::value shall be false
  13. #include <chrono>
  14. int main(int, char**)
  15. {
  16. std::chrono::duration<int> d(1.);
  17. return 0;
  18. }