CppCommon 1.0.5.0
C++ Common Library
Loading...
Searching...
No Matches
timespan.inl
Go to the documentation of this file.
1
9namespace CppCommon {
10
11inline void Timespan::swap(Timespan& timespan) noexcept
12{
13 using std::swap;
14 swap(_duration, timespan._duration);
15}
16
17inline void swap(Timespan& timespan1, Timespan& timespan2) noexcept
18{
19 timespan1.swap(timespan2);
20}
21
22} // namespace CppCommon
23
25template <>
26struct std::hash<CppCommon::Timespan>
27{
28 typedef CppCommon::Timespan argument_type;
29 typedef size_t result_type;
30
31 result_type operator() (const argument_type& value) const
32 {
33 result_type result = 17;
34 result = result * 31 + std::hash<int64_t>()(value.total());
35 return result;
36 }
37};
friend void swap(Timespan &timespan1, Timespan &timespan2) noexcept
Definition timespan.inl:17
C++ Common project definitions.
void swap(FileCache &cache1, FileCache &cache2) noexcept
Definition filecache.inl:23