Merge branch 'master' into sf-ankerl
This commit is contained in:
@@ -26,7 +26,7 @@ struct ConcurrentIDMap
|
||||
mutable UpgradableMutex mutex;
|
||||
|
||||
ConcurrentIDMap() = default;
|
||||
ConcurrentIDMap(ConcurrentIDMap &&other)
|
||||
ConcurrentIDMap(ConcurrentIDMap &&other) noexcept
|
||||
{
|
||||
if (this != &other)
|
||||
{
|
||||
@@ -36,7 +36,7 @@ struct ConcurrentIDMap
|
||||
data = std::move(other.data);
|
||||
}
|
||||
}
|
||||
ConcurrentIDMap &operator=(ConcurrentIDMap &&other)
|
||||
ConcurrentIDMap &operator=(ConcurrentIDMap &&other) noexcept
|
||||
{
|
||||
if (this != &other)
|
||||
{
|
||||
|
||||
@@ -166,7 +166,7 @@ class DeallocatingVectorIterator
|
||||
|
||||
template <typename ElementT> class DeallocatingVector;
|
||||
|
||||
template <typename T> void swap(DeallocatingVector<T> &lhs, DeallocatingVector<T> &rhs);
|
||||
template <typename T> void swap(DeallocatingVector<T> &lhs, DeallocatingVector<T> &rhs) noexcept;
|
||||
|
||||
template <typename ElementT> class DeallocatingVector
|
||||
{
|
||||
@@ -204,8 +204,8 @@ template <typename ElementT> class DeallocatingVector
|
||||
}
|
||||
|
||||
// moving is fine
|
||||
DeallocatingVector(DeallocatingVector &&other) { swap(other); }
|
||||
DeallocatingVector &operator=(DeallocatingVector &&other)
|
||||
DeallocatingVector(DeallocatingVector &&other) noexcept { swap(other); }
|
||||
DeallocatingVector &operator=(DeallocatingVector &&other) noexcept
|
||||
{
|
||||
swap(other);
|
||||
return *this;
|
||||
@@ -221,9 +221,10 @@ template <typename ElementT> class DeallocatingVector
|
||||
|
||||
~DeallocatingVector() { clear(); }
|
||||
|
||||
friend void swap<>(DeallocatingVector<ElementT> &lhs, DeallocatingVector<ElementT> &rhs);
|
||||
friend void swap<>(DeallocatingVector<ElementT> &lhs,
|
||||
DeallocatingVector<ElementT> &rhs) noexcept;
|
||||
|
||||
void swap(DeallocatingVector<ElementT> &other)
|
||||
void swap(DeallocatingVector<ElementT> &other) noexcept
|
||||
{
|
||||
std::swap(current_size, other.current_size);
|
||||
bucket_list.swap(other.bucket_list);
|
||||
@@ -342,7 +343,7 @@ template <typename ElementT> class DeallocatingVector
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T> void swap(DeallocatingVector<T> &lhs, DeallocatingVector<T> &rhs)
|
||||
template <typename T> void swap(DeallocatingVector<T> &lhs, DeallocatingVector<T> &rhs) noexcept
|
||||
{
|
||||
lhs.swap(rhs);
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ template <typename EdgeDataT> class DynamicGraph
|
||||
return *this;
|
||||
}
|
||||
|
||||
DynamicGraph(DynamicGraph &&other)
|
||||
DynamicGraph(DynamicGraph &&other) noexcept
|
||||
{
|
||||
number_of_nodes = other.number_of_nodes;
|
||||
// atomics can't be moved this is why we need an own constructor
|
||||
@@ -164,7 +164,7 @@ template <typename EdgeDataT> class DynamicGraph
|
||||
edge_list = std::move(other.edge_list);
|
||||
}
|
||||
|
||||
DynamicGraph &operator=(DynamicGraph &&other)
|
||||
DynamicGraph &operator=(DynamicGraph &&other) noexcept
|
||||
{
|
||||
number_of_nodes = other.number_of_nodes;
|
||||
// atomics can't be moved this is why we need an own constructor
|
||||
|
||||
@@ -10,9 +10,9 @@ namespace osrm::util
|
||||
|
||||
namespace permutation_detail
|
||||
{
|
||||
template <typename T> static inline void swap(T &a, T &b) { std::swap(a, b); }
|
||||
template <typename T> static inline void swap(T &a, T &b) noexcept { std::swap(a, b); }
|
||||
|
||||
static inline void swap(std::vector<bool>::reference a, std::vector<bool>::reference b)
|
||||
static inline void swap(std::vector<bool>::reference a, std::vector<bool>::reference b) noexcept
|
||||
{
|
||||
std::vector<bool>::swap(a, b);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user