diff --git a/CMakeLists.txt b/CMakeLists.txt index 3195a298b89..4799eee0938 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,7 +117,7 @@ endif() if(CMAKE_COMPILER_IS_GNUCXX) if("${CMAKE_CXX_FLAGS}" STREQUAL "${CMAKE_CXX_FLAGS_DEFAULT}") if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7) - string(APPEND CMAKE_CXX_FLAGS " -Wabi=11") + string(APPEND CMAKE_CXX_FLAGS " -Wabi=18") else() string(APPEND CMAKE_CXX_FLAGS " -Wabi") endif() diff --git a/apps/src/openni_mobile_server.cpp b/apps/src/openni_mobile_server.cpp index bf6778d1ff5..aee1892abf6 100644 --- a/apps/src/openni_mobile_server.cpp +++ b/apps/src/openni_mobile_server.cpp @@ -157,7 +157,7 @@ class PCLMobileServer { viewer_.showCloud(getLatestPointCloud()); - boost::asio::io_service io_service; + boost::asio::io_context io_service; tcp::endpoint endpoint(tcp::v4(), static_cast(port_)); tcp::acceptor acceptor(io_service, endpoint); tcp::socket socket(io_service); diff --git a/apps/src/openni_octree_compression.cpp b/apps/src/openni_octree_compression.cpp index 0a056054f34..4592cbd3407 100644 --- a/apps/src/openni_octree_compression.cpp +++ b/apps/src/openni_octree_compression.cpp @@ -415,7 +415,7 @@ main(int argc, char** argv) if (bEnDecode) { // ENCODING try { - boost::asio::io_service io_service; + boost::asio::io_context io_service; tcp::endpoint endpoint(tcp::v4(), 6666); tcp::acceptor acceptor(io_service, endpoint); @@ -423,7 +423,7 @@ main(int argc, char** argv) std::cout << "Waiting for connection.." << std::endl; - acceptor.accept(*socketStream.rdbuf()); + acceptor.accept(socketStream.rdbuf()->socket()); std::cout << "Connected!" << std::endl; diff --git a/apps/src/openni_organized_compression.cpp b/apps/src/openni_organized_compression.cpp index c0448bde55d..f68314f4bf7 100644 --- a/apps/src/openni_organized_compression.cpp +++ b/apps/src/openni_organized_compression.cpp @@ -438,7 +438,7 @@ main(int argc, char** argv) if (bEnDecode) { // ENCODING try { - boost::asio::io_service io_service; + boost::asio::io_context io_service; tcp::endpoint endpoint(tcp::v4(), 6666); tcp::acceptor acceptor(io_service, endpoint); @@ -446,7 +446,7 @@ main(int argc, char** argv) std::cout << "Waiting for connection.." << std::endl; - acceptor.accept(*socketStream.rdbuf()); + acceptor.accept(socketStream.rdbuf()->socket()); std::cout << "Connected!" << std::endl; diff --git a/io/include/pcl/io/hdl_grabber.h b/io/include/pcl/io/hdl_grabber.h index f149346b4a3..233ff2642be 100644 --- a/io/include/pcl/io/hdl_grabber.h +++ b/io/include/pcl/io/hdl_grabber.h @@ -274,7 +274,7 @@ namespace pcl boost::asio::ip::udp::endpoint udp_listener_endpoint_; boost::asio::ip::address source_address_filter_; std::uint16_t source_port_filter_; - boost::asio::io_service hdl_read_socket_service_; + boost::asio::io_context hdl_read_socket_service_; boost::asio::ip::udp::socket *hdl_read_socket_; std::string pcap_file_name_; std::thread *queue_consumer_thread_; diff --git a/io/include/pcl/io/robot_eye_grabber.h b/io/include/pcl/io/robot_eye_grabber.h index 52485049d02..4ed975d50e6 100644 --- a/io/include/pcl/io/robot_eye_grabber.h +++ b/io/include/pcl/io/robot_eye_grabber.h @@ -131,7 +131,7 @@ namespace pcl boost::asio::ip::address sensor_address_; boost::asio::ip::udp::endpoint sender_endpoint_; - boost::asio::io_service io_service_; + boost::asio::io_context io_service_; std::shared_ptr socket_; std::shared_ptr socket_thread_; std::shared_ptr consumer_thread_; diff --git a/io/include/pcl/io/tim_grabber.h b/io/include/pcl/io/tim_grabber.h index 786e501b967..91d8148c9a8 100644 --- a/io/include/pcl/io/tim_grabber.h +++ b/io/include/pcl/io/tim_grabber.h @@ -128,7 +128,7 @@ class PCL_EXPORTS TimGrabber : public Grabber std::vector distances_; boost::asio::ip::tcp::endpoint tcp_endpoint_; - boost::asio::io_service tim_io_service_; + boost::asio::io_context tim_io_service_; boost::asio::ip::tcp::socket tim_socket_; //// wait time for receiving data (on the order of milliseconds) unsigned int wait_time_milliseconds_ = 0; diff --git a/io/src/hdl_grabber.cpp b/io/src/hdl_grabber.cpp index c54f68edf37..adce104ad0a 100644 --- a/io/src/hdl_grabber.cpp +++ b/io/src/hdl_grabber.cpp @@ -287,7 +287,7 @@ pcl::HDLGrabber::loadHDL32Corrections () boost::asio::ip::address pcl::HDLGrabber::getDefaultNetworkAddress () { - return (boost::asio::ip::address::from_string ("192.168.3.255")); + return (boost::asio::ip::make_address ("192.168.3.255")); } ///////////////////////////////////////////////////////////////////////////// diff --git a/io/src/robot_eye_grabber.cpp b/io/src/robot_eye_grabber.cpp index 2db6da17906..22574a2bd23 100644 --- a/io/src/robot_eye_grabber.cpp +++ b/io/src/robot_eye_grabber.cpp @@ -269,7 +269,7 @@ void pcl::RobotEyeGrabber::socketThreadLoop () { asyncSocketReceive(); - io_service_.reset(); + io_service_.restart(); io_service_.run(); } diff --git a/io/src/tim_grabber.cpp b/io/src/tim_grabber.cpp index a97b9e374da..953f7bc3e9a 100644 --- a/io/src/tim_grabber.cpp +++ b/io/src/tim_grabber.cpp @@ -184,8 +184,8 @@ pcl::TimGrabber::start () try { boost::asio::ip::tcp::resolver resolver (tim_io_service_); - tcp_endpoint_ = *resolver.resolve (tcp_endpoint_); - tim_socket_.connect (tcp_endpoint_); + boost::asio::ip::tcp::resolver::results_type endpoints = resolver.resolve (tcp_endpoint_); + boost::asio::connect(tim_socket_, endpoints); } catch (std::exception& e) { diff --git a/io/src/vlp_grabber.cpp b/io/src/vlp_grabber.cpp index b35087b74b9..8e95b98189d 100644 --- a/io/src/vlp_grabber.cpp +++ b/io/src/vlp_grabber.cpp @@ -92,7 +92,7 @@ pcl::VLPGrabber::loadVLP16Corrections () boost::asio::ip::address pcl::VLPGrabber::getDefaultNetworkAddress () { - return (boost::asio::ip::address::from_string ("255.255.255.255")); + return (boost::asio::ip::make_address ("255.255.255.255")); } /////////////////////////////////////////////////////////////////////////////