diff options
author | Max Kellermann <max@duempel.org> | 2014-06-17 10:35:34 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-06-17 10:35:34 +0200 |
commit | eb8fd07900826e95afde15191bb2a0c34b46138a (patch) | |
tree | 8d28a14e7d2491932086678fb63d8ce9779aec75 /src/lib/nfs/Manager.hxx | |
parent | c99559dbe937eba73376137ceb5551f1c55764d5 (diff) | |
download | mpd-eb8fd07900826e95afde15191bb2a0c34b46138a.tar.gz mpd-eb8fd07900826e95afde15191bb2a0c34b46138a.tar.xz mpd-eb8fd07900826e95afde15191bb2a0c34b46138a.zip |
lib/nfs/Manager: gcc 4.7 compatibility hack
std::map::emplace() is only available from gcc 4.8 on.
Diffstat (limited to 'src/lib/nfs/Manager.hxx')
-rw-r--r-- | src/lib/nfs/Manager.hxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/nfs/Manager.hxx b/src/lib/nfs/Manager.hxx index 4a380bd51..11a779a2a 100644 --- a/src/lib/nfs/Manager.hxx +++ b/src/lib/nfs/Manager.hxx @@ -41,6 +41,13 @@ class NfsManager { :NfsConnection(_loop, _server, _export_name), manager(_manager) {} +#if defined(__GNUC__) && !defined(__clang__) && !GCC_CHECK_VERSION(4,8) + /* needed due to lack of std::map::emplace() */ + ManagedConnection(ManagedConnection &&other) + :NfsConnection(std::move(other)), + manager(other.manager) {} +#endif + protected: /* virtual methods from NfsConnection */ void OnNfsConnectionError(Error &&error) override; |