Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
std::chrono::chrono_detail Namespace Reference

Function Documentation

◆ duration_cast_impl() [1/4]

template<typename ToDuration, typename ConversionFactor, typename CommonRep, typename Rep>
auto std::chrono::chrono_detail::duration_cast_impl ( Rep const & count,
std::false_type ,
std::false_type  ) -> ToDuration
constexprnoexcept

Helper for duration_cast implementation that handles different conversion cases.

Template Parameters
ToDurationThe target duration type
ConversionFactorThe conversion factor ratio
CommonRepThe common representation type used for the conversion
RepThe representation type of the source duration
Parameters
countThe current number of ticks
Returns
The new duration

Note: This handles the default case where ConversionFactor::num != 1 and ConversionFactor::den != 1 (section 2.4 of the C++ standard).

◆ duration_cast_impl() [2/4]

template<typename ToDuration, typename ConversionFactor, typename CommonRep, typename Rep>
auto std::chrono::chrono_detail::duration_cast_impl ( Rep const & count,
std::false_type ,
std::true_type  ) -> ToDuration
constexprnoexcept

Helper for duration_cast implementation that handles different conversion cases.

Template Parameters
ToDurationThe target duration type
ConversionFactorThe conversion factor ratio
CommonRepThe common representation type used for the conversion
RepThe representation type of the source duration
Parameters
countThe current number of ticks
Returns
The new duration

Note: This handles the case where ConversionFactor::num != 1 and ConversionFactor::den == 1 (section 2.2 of the C++ standard).

◆ duration_cast_impl() [3/4]

template<typename ToDuration, typename ConversionFactor, typename CommonRep, typename Rep>
auto std::chrono::chrono_detail::duration_cast_impl ( Rep const & count,
std::true_type ,
std::false_type  ) -> ToDuration
constexprnoexcept

Helper for duration_cast implementation that handles different conversion cases.

Template Parameters
ToDurationThe target duration type
ConversionFactorThe conversion factor ratio
CommonRepThe common representation type used for the conversion
RepThe representation type of the source duration
Parameters
countThe current number of ticks
Returns
The new duration

Note: This handles the case where ConversionFactor::num == 1 and ConversionFactor::den != 1 (section 2.3 of the C++ standard).

◆ duration_cast_impl() [4/4]

template<typename ToDuration, typename ConversionFactor, typename CommonRep, typename Rep>
auto std::chrono::chrono_detail::duration_cast_impl ( Rep const & count,
std::true_type ,
std::true_type  ) -> ToDuration
constexprnoexcept

Helper for duration_cast implementation that handles different conversion cases.

Template Parameters
ToDurationThe target duration type
ConversionFactorThe conversion factor ratio
CommonRepThe common representation type used for the conversion
RepThe representation type of the source duration
Parameters
countThe current number of ticks
Returns
The new duration

Note: This handles the case where ConversionFactor::num == 1 and ConversionFactor::den == 1 (section 2.1 of the C++ standard).

Variable Documentation

◆ duration_op_noexcept_v

template<typename BinaryOp, typename Duration1, typename Duration2, typename Common = common_type_t<Duration1, Duration2>>
bool std::chrono::chrono_detail::duration_op_noexcept_v
externconstexpr
Initial value:
=
constexpr bool is_nothrow_invocable_v
Determine if a functor type is no-throw invocable with the specified argument types.
constexpr bool is_nothrow_constructible_v
Type trait to detect if a type is constructible from arguments of the specified types and is noexcept...

Variable template indicating if the given operation is noexcept for the given duration types.

Template Parameters
BinaryOpFunction object representing the operation to check
Duration1The first duration type
Duration2The second duration type

◆ duration_scalar_op_noexcept_v

template<typename BinaryOp, typename Rep1, typename Rep2, typename Common = common_type_t<Rep1, Rep2>>
bool std::chrono::chrono_detail::duration_scalar_op_noexcept_v
externconstexpr
Initial value:

Variable template indicating if the given operation is noexcept for the given scalar types.

Template Parameters
BinaryOpFunction object representing the operation to check
Rep1The first scalar type
Rep2The second scalar type