literals1.fail.cpp 579 B

1234567891011121314151617181920
  1. // -*- C++ -*-
  2. //===----------------------------------------------------------------------===//
  3. //
  4. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  5. // See https://llvm.org/LICENSE.txt for license information.
  6. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  7. //
  8. //===----------------------------------------------------------------------===//
  9. // UNSUPPORTED: c++98, c++03, c++11
  10. #include <chrono>
  11. #include <cassert>
  12. int main(int, char**)
  13. {
  14. std::chrono::hours h = 4h; // should fail w/conversion operator not found
  15. return 0;
  16. }