From c403a0027efa16afb3941eb726a65cda7e117939 Mon Sep 17 00:00:00 2001 From: Andrew Udvare Date: Tue, 3 Dec 2024 09:01:22 +0000 Subject: [PATCH] Boost: Fix building against Boost 1.86.0 --- CMakeLists.txt | 2 -- src/input_common/helpers/udp_protocol.h | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9cfd212f6a..99dee71f00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -280,8 +280,6 @@ endif() # Configure C++ standard # =========================== -# boost asio's concept usage doesn't play nicely with some compilers yet. -add_definitions(-DBOOST_ASIO_DISABLE_CONCEPTS) if (MSVC) add_compile_options($<$:/std:c++20>) diff --git a/src/input_common/helpers/udp_protocol.h b/src/input_common/helpers/udp_protocol.h index dba9f87d95..3a99332e13 100644 --- a/src/input_common/helpers/udp_protocol.h +++ b/src/input_common/helpers/udp_protocol.h @@ -13,6 +13,7 @@ #endif #include +#include #ifdef _MSC_VER #pragma warning(pop) @@ -69,7 +70,7 @@ Message CreateMessage(const u32 magic, const T data, const u32 sender_id) { }; Message message{header, data}; crc.process_bytes(&message, sizeof(Message)); - message.header.crc = crc.checksum(); + message.header.crc = boost::numeric_cast(crc.checksum()); return message; }