blob: 064c1283039fc30046e8a8524b71270282e4d6e6 [file] [log] [blame]
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14
// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
// typedef TrivialClock file_time_type;
#include <filesystem>
#include <chrono>
#include <type_traits>
#include "test_macros.h"
namespace fs = std::filesystem;
// system_clock is used because it meets the requirements of TrivialClock,
// and the resolution and range of system_clock should match the operating
// system's file time type.
void test_trivial_clock() {
using namespace fs;
using Clock = file_time_type::clock;
ASSERT_NOEXCEPT(Clock::now());
ASSERT_SAME_TYPE(decltype(Clock::now()), file_time_type);
ASSERT_SAME_TYPE(Clock::time_point, file_time_type);
volatile auto* odr_use = &Clock::is_steady;
((void)odr_use);
}
int main(int, char**) {
test_trivial_clock();
return 0;
}