fix: Add missing include when building with boost 1.91#568
Open
soerengrunewald wants to merge 1 commit into
Open
fix: Add missing include when building with boost 1.91#568soerengrunewald wants to merge 1 commit into
soerengrunewald wants to merge 1 commit into
Conversation
[Why]
When build with boost 1.91 the compiler complains:
> In file included from DeviceAccess/backends/Rebot/src/Connection.cc:4:
> DeviceAccess/backends/Rebot/src/Connection.h:45:18: error: ‘deadline_timer’ in namespace ‘boost::asio’ does not name a type
> 45 | boost::asio::deadline_timer disconnectTimer_;
> | ^~~~~~~~~~~~~~
> DeviceAccess/backends/Rebot/src/Connection.h:46:18: error: ‘deadline_timer’ in namespace ‘boost::asio’ does not name a type
> 46 | boost::asio::deadline_timer::duration_type connectionTimeout_;
> | ^~~~~~~~~~~~~~
> DeviceAccess/backends/Rebot/src/Connection.cc: In constructor ‘ChimeraTK::Rebot::Connection::Connection(std::string, std::string, uint32_t)’:
> DeviceAccess/backends/Rebot/src/Connection.cc:14:75: error: class ‘ChimeraTK::Rebot::Connection’ does not have any field named ‘disconnectTimer_’
> 14 | : address_(std::move(address)), port_(std::move(port)), s_(ioContext_), disconnectTimer_(ioContext_),
> | ^~~~~~~~~~~~~~~~
> DeviceAccess/backends/Rebot/src/Connection.cc:15:5: error: class ‘ChimeraTK::Rebot::Connection’ does not have any field named ‘connectionTimeout_’
> 15 | connectionTimeout_(boost::posix_time::seconds(connectionTimeout_sec)) {}
> | ^~~~~~~~~~~~~~~~~~
> DeviceAccess/backends/Rebot/src/Connection.cc:15:43: error: ‘seconds’ is not a member of ‘boost::posix_time’
> 15 | connectionTimeout_(boost::posix_time::seconds(connectionTimeout_sec)) {}
> | ^~~~~~~
[How]
Add the missing include, though this will solve the problem only
partially, as it will compile, but emit warnings, as the deadline
timer is marked deprecated and should be replaced with system_timer.
Signed-off-by: Soeren Grunewald <soeren.grunewald@desy.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
When build with boost 1.91 the compiler complains:
How
Add the missing include, though this will solve the problem only partially, as it will compile, but emit warnings, as the deadline timer is marked deprecated and should be replaced with system_timer.