scylladb / cpp-driver

Scylla C/C++ Driver
25 stars 25 forks source link

Failed to compile from source - connection_pool.cpp:101:49: error: redundant move in initialization - remove ‘std::move’ call #79

Closed mykaul closed 1 year ago

mykaul commented 1 year ago
[ 20%] Building CXX object src/CMakeFiles/scylla-cpp-driver.dir/connection_pool.cpp.o
/home/ykaul/github/cpp-driver/src/connection_pool.cpp: In constructor ‘datastax::internal::core::ConnectionPool::ConnectionPool(const datastax::internal::core::Connection::Vec&, datastax::internal::core::ConnectionPoolListener*, const datastax::String&, uv_loop_t*, const datastax::internal::core::Host::Ptr&, datastax::internal::core::ProtocolVersion, const datastax::internal::core::ConnectionPoolSettings&, datastax::internal::core::Metrics*, const datastax::internal::core::ShardPortCalculator*)’:
/home/ykaul/github/cpp-driver/src/connection_pool.cpp:101:49: error: redundant move in initialization [-Werror=redundant-move]
  101 |         host_->add_unpooled_connection(std::move(connection));
      |                                        ~~~~~~~~~^~~~~~~~~~~~
/home/ykaul/github/cpp-driver/src/connection_pool.cpp:101:49: note: remove ‘std::move’ call
cc1plus: all warnings being treated as errors

Fedora 38, latest git (eb6b70d138752c5e6a487eeaf69e6baa4d6652a4 )

jaw-sh commented 1 year ago

I was unable to get any official version of this driver to compile on Arch and found this issue while looking around. I was particularly miffed because I had managed to compile it earlier after following a link from the Aur.

I noticed that the link was actually different and I had first downloaded and compiled the Datastax version, and confirmed that the datastax/cpp-driver version worked out of the box on Arch.

Hope that helps.

mykaul commented 1 year ago

I was unable to get any official version of this driver to compile on Arch and found this issue while looking around. I was particularly miffed because I had managed to compile it earlier after following a link from the Aur.

I noticed that the link was actually different and I had first downloaded and compiled the Datastax version, and confirmed that the datastax/cpp-driver version worked out of the box on Arch.

Hope that helps.

Did it fail to compile with the same issue?

jaw-sh commented 1 year ago

Exactly the same warning, yes.