brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 9d4ab04 Raw
35 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: c++03, c++11, c++14, c++1710 11// <chrono>12 13// time_point14 15// template<class Clock, class Duration1,16//          three_way_comparable_with<Duration1> Duration2>17//   constexpr auto operator<=>(const time_point<Clock, Duration1>& lhs,18//                              const time_point<Clock, Duration2>& rhs);19 20// time_points with different clocks should not compare21 22#include <chrono>23 24#include "../../clock.h"25 26int main(int, char**) {27  using namespace std::chrono_literals;28  std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds> t1{3ms};29  std::chrono::time_point<Clock, std::chrono::milliseconds> t2{3ms};30 31  t1 <=> t2;32 33  return 0;34}35