]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test: fix ambiguous reference to _1
authorWillem Jan Withagen <wjw@digiware.nl>
Wed, 29 Jul 2020 12:01:10 +0000 (12:01 +0000)
committerWillem Jan Withagen <wjw@digiware.nl>
Thu, 30 Jul 2020 09:52:32 +0000 (09:52 +0000)
FreeBSD/Clang/lib complains:
/home/jenkins/workspace/ceph-master/src/test/librados_test_stub/TestRadosClient.cc:295:55: error: reference to '_1' is ambiguous
    &TestRadosClient::finish_aio_completion, this, c, _1));
                                                      ^
/usr/local/include/boost/bind/placeholders.hpp:46:38: note: candidate found by name lookup is 'boost::placeholders::_1'
BOOST_STATIC_CONSTEXPR boost::arg<1> _1;
                                     ^
/usr/include/c++/v1/functional:2448:46: note: candidate found by name lookup is 'std::__1::placeholders::_1'
/* _LIBCPP_INLINE_VAR */ constexpr __ph<1>   _1{};

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/test/librados_test_stub/TestRadosClient.cc

index c426f2fcf4d64360f2541938df76b2352ef161ed..7687154832838fd036c36f424990dae112827f6c 100644 (file)
@@ -292,7 +292,7 @@ void TestRadosClient::flush_aio_operations(AioCompletionImpl *c) {
 int TestRadosClient::aio_watch_flush(AioCompletionImpl *c) {
   c->get();
   Context *ctx = new LambdaContext(std::bind(
-    &TestRadosClient::finish_aio_completion, this, c, _1));
+    &TestRadosClient::finish_aio_completion, this, c, std::placeholders::_1));
   get_watch_notify()->aio_flush(this, ctx);
   return 0;
 }