From 490ed632ae7ecad21f6b6e1983c5c663d0846ffd Mon Sep 17 00:00:00 2001
From: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
Date: Wed, 11 Jan 2017 10:37:52 -0500
Subject: [PATCH] fix C++14 usage that brokes some builds

Some builds, like OSX and Debian 8, fails to build the daemon
as a patch has recently introduced a C++14 feature, but we don't
support C++14 by default on all platforms.

This patch changes the code to require only a C++11 compiler.

Change-Id: Ib858a6abddb610b6f94cedc01945c0de92f00687
---
 src/ringdht/ringaccount.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/ringdht/ringaccount.cpp b/src/ringdht/ringaccount.cpp
index f4305badb5..ffc9e0fb5f 100644
--- a/src/ringdht/ringaccount.cpp
+++ b/src/ringdht/ringaccount.cpp
@@ -2349,9 +2349,9 @@ RingAccount::findCertificate(const dht::InfoHash& h, std::function<void(const st
         if (cb)
             cb(cert);
     } else {
-        dht_.findCertificate(h, [cb{std::move(cb)}](const std::shared_ptr<dht::crypto::Certificate> crt) {
+        dht_.findCertificate(h, [cb](const std::shared_ptr<dht::crypto::Certificate>& crt) {
             if (crt)
-                tls::CertificateStore::instance().pinCertificate(std::move(crt));
+                tls::CertificateStore::instance().pinCertificate(crt);
             if (cb)
                 cb(crt);
         });
-- 
GitLab