|
|
|||
File indexing completed on 2026-08-17 08:38:47
0001 /* 0002 * Distributed under the Boost Software License, Version 1.0. 0003 * (See accompanying file LICENSE_1_0.txt or copy at 0004 * http://www.boost.org/LICENSE_1_0.txt) 0005 * 0006 * Copyright (c) 2025 Andrey Semashev 0007 */ 0008 /*! 0009 * \file atomic/posix_clock_traits_fwd.hpp 0010 * 0011 * This header contains declaration of the \c posix_clock_traits class template. 0012 */ 0013 0014 #ifndef BOOST_ATOMIC_POSIX_CLOCK_TRAITS_FWD_HPP_INCLUDED_ 0015 #define BOOST_ATOMIC_POSIX_CLOCK_TRAITS_FWD_HPP_INCLUDED_ 0016 0017 #include <boost/atomic/detail/config.hpp> 0018 #include <boost/atomic/detail/header.hpp> 0019 0020 #ifdef BOOST_HAS_PRAGMA_ONCE 0021 #pragma once 0022 #endif 0023 0024 namespace boost { 0025 namespace atomics { 0026 0027 /*! 0028 * \brief The structure contains traits for compatibility between chrono clocks and POSIX clocks. 0029 * 0030 * This class template is meant to be specialized for clock types that are compatible with `std::chrono` 0031 * requirements and are based on one of the POSIX clocks identified by 0032 * a [`clockid_t`](https://man7.org/linux/man-pages/man3/clockid_t.3type.html) constant. 0033 * 0034 * Every specialization of this class must support the following interface: 0035 * 0036 * ``` 0037 * // POSIX clock identifier 0038 * static constexpr clockid_t clock_id = ...; 0039 * 0040 * // Function that converts a time point to a timespec structure 0041 * static timespec to_timespec(Clock::time_point time_point) noexcept; 0042 * ``` 0043 * 0044 * Note that the `timespec` structure returned from `to_timespec` must use the identified POSIX 0045 * clock epoch and time units. There are no invalid input `time_point` values, so `to_timespec` 0046 * must never fail with an exception. 0047 * 0048 * The second template parameter of this class template may be used by partial specializations 0049 * to leverage SFINAE to selectively enable it for a set of clock types. 0050 */ 0051 template< typename Clock, typename = void > 0052 struct posix_clock_traits; 0053 0054 } // namespace atomics 0055 } // namespace boost 0056 0057 #include <boost/atomic/detail/footer.hpp> 0058 0059 #endif // BOOST_ATOMIC_POSIX_CLOCK_TRAITS_FWD_HPP_INCLUDED_
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|