From f08ea2051eeff565d7d63d721371206133c48b63 Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Wed, 9 Mar 2022 18:11:20 +0100 Subject: FileSystemManager: Support set epoch time on file creation --- src/utils/cpp/concepts.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/utils/cpp/concepts.hpp') diff --git a/src/utils/cpp/concepts.hpp b/src/utils/cpp/concepts.hpp index 92718b43..597179e1 100644 --- a/src/utils/cpp/concepts.hpp +++ b/src/utils/cpp/concepts.hpp @@ -1,6 +1,7 @@ #ifndef INCLUDED_SRC_UTILS_CPP_CONCEPTS_HPP #define INCLUDED_SRC_UTILS_CPP_CONCEPTS_HPP +#include #include #include @@ -52,4 +53,17 @@ template concept InputIterableStringContainer = InputIterableContainerand ContainsString; +// TODO(modernize): remove this once we require clang version >= 14.0.0 +template +concept ClockHasFromSys = + requires(std::chrono::time_point const tp) { + T::from_sys(tp); +}; + +// TODO(modernize): remove this once we require clang version >= 14.0.0 +template +concept ClockHasFromTime = requires(std::time_t const t) { + T::from_time_t(t); +}; + #endif // INCLUDED_SRC_UTILS_CPP_CONCEPTS_HPP -- cgit v1.2.3