]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
c++11: fix std::lock naming conflicts
authorNoah Watkins <noahwatkins@gmail.com>
Sun, 29 Dec 2013 18:32:22 +0000 (10:32 -0800)
committerNoah Watkins <noahwatkins@gmail.com>
Sun, 29 Dec 2013 21:31:59 +0000 (13:31 -0800)
commitc7e1c4bfdb26dd51714c95bc7131ad949965482a
tree0b95da0e05b9a739639490a56ca295d0cf7ada22
parentbbcb022319edab0ee4f62cb0fda477ce1d6481af
c++11: fix std::lock naming conflicts

Unfortunately, 'using namespace std;' is in pretty widespread use in the Ceph
tree, so we need to rename to avoid the conflict.

Example error output:

test/streamtest.cc:37:19: error: reference to 'lock' is ambiguous
  Mutex::Locker l(lock);
                  ^
test/streamtest.cc:32:7: note: candidate found by name lookup is 'lock'
Mutex lock("streamtest.cc lock");
      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/mutex:346:1: note: candidate found by name lookup is 'std::__1::lock'
lock(_L0& __l0, _L1& __l1)

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
src/test/librados/tier.cc
src/test/streamtest.cc
src/test/test_filejournal.cc
src/test/testmsgr.cc