We can now use std::exchange() as we switched to C++17

This commit is contained in:
bubnikv 2019-12-19 09:27:30 +01:00
parent 71ff0f9cae
commit 2bf472988b
2 changed files with 4 additions and 12 deletions

View file

@ -217,14 +217,6 @@ inline typename CONTAINER_TYPE::value_type& next_value_modulo(typename CONTAINER
return container[next_idx_modulo(idx, container.size())];
}
template<class T, class U = T>
inline T exchange(T& obj, U&& new_value)
{
T old_value = std::move(obj);
obj = std::forward<U>(new_value);
return old_value;
}
extern std::string xml_escape(std::string text);