From 4ee06f32478405526195c6bbac8f2229d49b1d95 Mon Sep 17 00:00:00 2001 From: Christoph Pohl <christoph.pohl@kit.edu> Date: Mon, 3 Jan 2022 10:13:08 +0100 Subject: [PATCH] Fixed compilation issues under U21.10 --- CMakeLists.txt | 2 ++ SimoxUtility/algorithm/string/string_tools.h | 2 +- SimoxUtility/color/ColorMap.h | 1 + SimoxUtility/json/json.hpp | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ecbb64545..fc75bb5f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,8 @@ elseif(NOT "" STREQUAL "$ENV{Simox_BOOST_VERSION}") SET(Simox_BOOST_VERSION $ENV{Simox_BOOST_VERSION}) elseif(RELEASE_CODENAME STREQUAL focal OR RELEASE_CODENAME STREQUAL odin) SET(Simox_BOOST_VERSION 1.71.0) +elseif(RELEASE_CODENAME STREQUAL impish) + SET(Simox_BOOST_VERSION 1.74.0) else() SET(Simox_BOOST_VERSION 1.65.1) endif() diff --git a/SimoxUtility/algorithm/string/string_tools.h b/SimoxUtility/algorithm/string/string_tools.h index 1a7e8b3ed..73e2ba7fe 100644 --- a/SimoxUtility/algorithm/string/string_tools.h +++ b/SimoxUtility/algorithm/string/string_tools.h @@ -21,7 +21,7 @@ #pragma once -#include <string> +#include <cstring> #include <sstream> #include <vector> #include <locale> diff --git a/SimoxUtility/color/ColorMap.h b/SimoxUtility/color/ColorMap.h index d0ec4c553..951b83cae 100644 --- a/SimoxUtility/color/ColorMap.h +++ b/SimoxUtility/color/ColorMap.h @@ -5,6 +5,7 @@ #include <initializer_list> #include <map> #include <string> +#include <optional> #include <SimoxUtility/algorithm/apply.hpp> #include <SimoxUtility/algorithm/minmax.h> diff --git a/SimoxUtility/json/json.hpp b/SimoxUtility/json/json.hpp index 931e7b366..969fd49ae 100644 --- a/SimoxUtility/json/json.hpp +++ b/SimoxUtility/json/json.hpp @@ -9627,7 +9627,7 @@ class binary_writer static CharType to_char_type(std::uint8_t x) noexcept { static_assert(sizeof(std::uint8_t) == sizeof(CharType), "size of CharType must be equal to std::uint8_t"); - static_assert(std::is_pod<CharType>::value, "CharType must be POD"); + static_assert(std::is_standard_layout_v<CharType> && std::is_trivial_v<CharType>, "CharType must be POD"); CharType result; std::memcpy(&result, &x, sizeof(x)); return result; -- GitLab