userver
C++ Async Framework
Loading...
Searching...
No Matches
recentperiod_detail.hpp
1
#
pragma
once
2
3
USERVER_NAMESPACE_BEGIN
4
5
namespace
utils
::statistics::detail {
6
7
// Detect if the result type provides Add(Counter, Duration, Duration) function
8
template
<
typename
Result,
typename
Counter,
typename
Duration>
9
concept
ResultWantsAddFunction =
requires
(Result& r, Counter c, Duration d) { r.Add(c, d, d); };
10
11
// Detect if a counter can be added to the result
12
template
<
typename
Result,
typename
Counter>
13
concept
ResultCanUseAddAssign =
requires
(Result& r,
const
Counter& c) { r += c; };
14
15
// Detect if a Counter provides a Reset function
16
template
<
typename
Counter>
17
concept
CanReset =
requires
(Counter& c) { c.Reset(); };
18
19
}
// namespace utils::statistics::detail
20
21
USERVER_NAMESPACE_END
userver
utils
statistics
recentperiod_detail.hpp
Generated on Mon May 4 2026 12:03:04 for userver by
Doxygen
1.13.2