ci: support C++23
This commit is contained in:
parent
b90799c277
commit
fab3b5eac4
2
.github/workflows/android.yml
vendored
2
.github/workflows/android.yml
vendored
@ -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]
|
||||
|
||||
|
||||
2
.github/workflows/emscripten.yml
vendored
2
.github/workflows/emscripten.yml
vendored
@ -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
|
||||
|
||||
2
.github/workflows/linux.yml
vendored
2
.github/workflows/linux.yml
vendored
@ -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
|
||||
|
||||
2
.github/workflows/macos.yml
vendored
2
.github/workflows/macos.yml
vendored
@ -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
|
||||
|
||||
4
.github/workflows/windows.yml
vendored
4
.github/workflows/windows.yml
vendored
@ -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
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user