Fixed build.

This commit is contained in:
John Preston 2016-09-29 17:04:43 +03:00
parent 5b3ac58578
commit 5d37517eac
3 changed files with 4 additions and 2 deletions

View file

@ -90,7 +90,7 @@ inline constexpr typename remove_reference<T>::type &&move(T &&value) noexcept {
}
template <typename T>
void swap(T &a, T &b) {
void swap_moveable(T &a, T &b) {
T tmp = move(a);
a = move(b);
b = move(tmp);

View file

@ -90,7 +90,7 @@ inline void accumulate_min(T &a, const T &b) { if (a > b) a = b; }
template <typename T>
T createAndSwap(T &value) {
T result = T();
std_::swap(result, value);
std_::swap_moveable(result, value);
return std_::move(result);
}

View file

@ -20,6 +20,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
*/
#pragma once
#include "core/stl_subset.h"
// some minimal implementation of std::vector() for moveable (but not copiable) types.
namespace std_ {