Skip to content

fix: Add missing include when building with boost 1.91#568

Open
soerengrunewald wants to merge 1 commit into
ChimeraTK:masterfrom
soerengrunewald:fix/add-missing-include-for-boost191
Open

fix: Add missing include when building with boost 1.91#568
soerengrunewald wants to merge 1 commit into
ChimeraTK:masterfrom
soerengrunewald:fix/add-missing-include-for-boost191

Conversation

@soerengrunewald

Copy link
Copy Markdown

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.

[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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant