util/RefCount: no "constexpr" with libc++

Not supported by libc++.
This commit is contained in:
Max Kellermann 2013-11-11 08:26:16 +01:00
parent faf5821816
commit 0b6548a282
2 changed files with 7 additions and 1 deletions

1
NEWS
View File

@ -2,6 +2,7 @@ ver 0.18.4 (not yet released)
* decoder * decoder
- dsdiff: fix byte order bug - dsdiff: fix byte order bug
* fix build failures due to missing includes * fix build failures due to missing includes
* libc++ compatibility
ver 0.18.3 (2013/11/08) ver 0.18.3 (2013/11/08)
* fix stuck MPD after song change (0.18.2 regression) * fix stuck MPD after song change (0.18.2 regression)

View File

@ -42,7 +42,12 @@ class RefCount {
std::atomic_uint n; std::atomic_uint n;
public: public:
constexpr RefCount():n(1) {} #ifndef _LIBCPP_VERSION
/* the "constexpr" is missing in libc++'s "atomic"
implementation */
constexpr
#endif
RefCount():n(1) {}
void Increment() { void Increment() {
++n; ++n;