ci: support C++23

This commit is contained in:
Sergiu Deitsch 2023-10-05 21:41:20 +02:00
parent b90799c277
commit fab3b5eac4
No known key found for this signature in database
6 changed files with 14 additions and 6 deletions

View File

@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: true
matrix:
std: [14, 17, 20]
std: [14, 17, 20, 23]
abi: [arm64-v8a, armeabi-v7a, x86_64, x86]
build_type: [Debug, Release]

View File

@ -15,7 +15,7 @@ jobs:
matrix:
build_type: [Release, Debug]
lib: [static]
std: [14, 17, 20]
std: [14, 17, 20, 23]
steps:
- uses: actions/checkout@v3

View File

@ -14,7 +14,7 @@ jobs:
matrix:
build_type: [Release, Debug]
lib: [shared, static]
std: [14, 17, 20]
std: [14, 17, 20, 23]
steps:
- uses: actions/checkout@v3

View File

@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: true
matrix:
std: [14, 17, 20]
std: [14, 17, 20, 23]
include:
- generator: Ninja
- build_type: Debug

View File

@ -19,7 +19,7 @@ jobs:
build_type: [Debug, Release]
lib: [shared, static]
msvc: [VS-16-2019, VS-17-2022]
std: [14, 17, 20]
std: [14, 17, 20, 23]
include:
- msvc: VS-16-2019
os: windows-2019
@ -138,7 +138,7 @@ jobs:
matrix:
build_type: [Debug]
lib: [shared, static]
std: [14, 17, 20]
std: [14, 17, 20, 23]
sys: [mingw32, mingw64]
include:
- sys: mingw32

View File

@ -33,8 +33,10 @@
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <iomanip>
#include <string>
#ifdef HAVE_UNISTD_H
# include <unistd.h> // For _exit.
#endif
@ -1552,9 +1554,15 @@ static LogMessage::LogMessageData fatal_msg_data_shared;
// allocations).
static thread_local bool thread_data_available = true;
#if defined(__cpp_lib_byte) && __cpp_lib_byte >= 201603L
// std::aligned_storage is deprecated in C++23
alignas(LogMessage::LogMessageData) static std::byte
thread_msg_data[sizeof(LogMessage::LogMessageData)];
#else // !(defined(__cpp_lib_byte) && __cpp_lib_byte >= 201603L)
static thread_local std::aligned_storage<
sizeof(LogMessage::LogMessageData),
alignof(LogMessage::LogMessageData)>::type thread_msg_data;
#endif // defined(__cpp_lib_byte) && __cpp_lib_byte >= 201603L
#endif // defined(GLOG_THREAD_LOCAL_STORAGE)
LogMessage::LogMessageData::LogMessageData()