fix ambiguous name (gcc)

This commit is contained in:
Konstantin Käfer
2015-02-13 14:50:20 -08:00
committed by Konstantin Käfer
parent 025654a101
commit 2075d6bb9a
2 changed files with 5 additions and 5 deletions

View File

@@ -89,7 +89,7 @@ public:
private:
T *ptr = nullptr;
lock lock;
class lock lock;
};

View File

@@ -33,11 +33,11 @@ lock::lock(const std::unique_ptr<mutex> &mtx_) : mtx(mtx_.get()) {
lock::~lock() {
if (mtx) { mtx->unlock(); }
}
lock::lock(lock &&lock) {
std::swap(mtx, lock.mtx);
lock::lock(lock &&other) {
std::swap(mtx, other.mtx);
}
lock &lock::operator=(lock &&lock) {
std::swap(mtx, lock.mtx);
lock &lock::operator=(lock &&other) {
std::swap(mtx, other.mtx);
return *this;
}