summaryrefslogtreecommitdiff
path: root/src/Chrono.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2016-11-18 08:41:47 +0100
committerMax Kellermann <max@musicpd.org>2016-11-18 08:41:47 +0100
commit2f76f9da891175ba331a6d29574bd2635cfa1bc8 (patch)
treebb7a3556acc6f38ccae0746ec0a0fcfcdefd0274 /src/Chrono.hxx
parentb0b8f573bc32d0eee6d417e026b7647e6a963717 (diff)
configure.ac: enable C++14
Diffstat (limited to 'src/Chrono.hxx')
-rw-r--r--src/Chrono.hxx19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/Chrono.hxx b/src/Chrono.hxx
index 3bb1cc469..96e871d8b 100644
--- a/src/Chrono.hxx
+++ b/src/Chrono.hxx
@@ -20,19 +20,10 @@
#ifndef MPD_CHRONO_HXX
#define MPD_CHRONO_HXX
-#include "Compiler.h"
-
#include <chrono>
#include <utility>
#include <cstdint>
-#if GCC_OLDER_THAN(4,7)
-/* std::chrono::duration operators are "constexpr" since gcc 4.7 */
-#define chrono_constexpr gcc_pure
-#else
-#define chrono_constexpr constexpr
-#endif
-
/**
* A time stamp within a song. Granularity is 1 millisecond and the
* maximum value is about 49 days.
@@ -108,11 +99,11 @@ public:
return count() > 0;
}
- chrono_constexpr SongTime operator+(const SongTime &other) const {
+ constexpr SongTime operator+(const SongTime &other) const {
return SongTime(*(const Base *)this + (const Base &)other);
}
- chrono_constexpr SongTime operator-(const SongTime &other) const {
+ constexpr SongTime operator-(const SongTime &other) const {
return SongTime(*(const Base *)this - (const Base &)other);
}
};
@@ -212,15 +203,13 @@ public:
return count() < 0;
}
- chrono_constexpr SignedSongTime operator+(const SignedSongTime &other) const {
+ constexpr SignedSongTime operator+(const SignedSongTime &other) const {
return SignedSongTime(*(const Base *)this + (const Base &)other);
}
- chrono_constexpr SignedSongTime operator-(const SignedSongTime &other) const {
+ constexpr SignedSongTime operator-(const SignedSongTime &other) const {
return SignedSongTime(*(const Base *)this - (const Base &)other);
}
};
-#undef chrono_constexpr
-
#endif