default_ratio.pass.cpp 741 B

1234567891011121314151617181920212223242526272829
  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. // Test default template arg:
  11. // template <class Rep, class Period = ratio<1>>
  12. // class duration;
  13. #include <chrono>
  14. #include <type_traits>
  15. #include "test_macros.h"
  16. int main(int, char**)
  17. {
  18. static_assert((std::is_same<std::chrono::duration<int, std::ratio<1> >,
  19. std::chrono::duration<int> >::value), "");
  20. return 0;
  21. }