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:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
std: [14, 17, 20]
|
std: [14, 17, 20, 23]
|
||||||
abi: [arm64-v8a, armeabi-v7a, x86_64, x86]
|
abi: [arm64-v8a, armeabi-v7a, x86_64, x86]
|
||||||
build_type: [Debug, Release]
|
build_type: [Debug, Release]
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/emscripten.yml
vendored
2
.github/workflows/emscripten.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
build_type: [Release, Debug]
|
build_type: [Release, Debug]
|
||||||
lib: [static]
|
lib: [static]
|
||||||
std: [14, 17, 20]
|
std: [14, 17, 20, 23]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|||||||
2
.github/workflows/linux.yml
vendored
2
.github/workflows/linux.yml
vendored
@ -14,7 +14,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
build_type: [Release, Debug]
|
build_type: [Release, Debug]
|
||||||
lib: [shared, static]
|
lib: [shared, static]
|
||||||
std: [14, 17, 20]
|
std: [14, 17, 20, 23]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|||||||
2
.github/workflows/macos.yml
vendored
2
.github/workflows/macos.yml
vendored
@ -9,7 +9,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
std: [14, 17, 20]
|
std: [14, 17, 20, 23]
|
||||||
include:
|
include:
|
||||||
- generator: Ninja
|
- generator: Ninja
|
||||||
- build_type: Debug
|
- build_type: Debug
|
||||||
|
|||||||
4
.github/workflows/windows.yml
vendored
4
.github/workflows/windows.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
|||||||
build_type: [Debug, Release]
|
build_type: [Debug, Release]
|
||||||
lib: [shared, static]
|
lib: [shared, static]
|
||||||
msvc: [VS-16-2019, VS-17-2022]
|
msvc: [VS-16-2019, VS-17-2022]
|
||||||
std: [14, 17, 20]
|
std: [14, 17, 20, 23]
|
||||||
include:
|
include:
|
||||||
- msvc: VS-16-2019
|
- msvc: VS-16-2019
|
||||||
os: windows-2019
|
os: windows-2019
|
||||||
@ -138,7 +138,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
build_type: [Debug]
|
build_type: [Debug]
|
||||||
lib: [shared, static]
|
lib: [shared, static]
|
||||||
std: [14, 17, 20]
|
std: [14, 17, 20, 23]
|
||||||
sys: [mingw32, mingw64]
|
sys: [mingw32, mingw64]
|
||||||
include:
|
include:
|
||||||
- sys: mingw32
|
- sys: mingw32
|
||||||
|
|||||||
@ -33,8 +33,10 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <cstddef>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
# include <unistd.h> // For _exit.
|
# include <unistd.h> // For _exit.
|
||||||
#endif
|
#endif
|
||||||
@ -1552,9 +1554,15 @@ static LogMessage::LogMessageData fatal_msg_data_shared;
|
|||||||
// allocations).
|
// allocations).
|
||||||
static thread_local bool thread_data_available = true;
|
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<
|
static thread_local std::aligned_storage<
|
||||||
sizeof(LogMessage::LogMessageData),
|
sizeof(LogMessage::LogMessageData),
|
||||||
alignof(LogMessage::LogMessageData)>::type thread_msg_data;
|
alignof(LogMessage::LogMessageData)>::type thread_msg_data;
|
||||||
|
#endif // defined(__cpp_lib_byte) && __cpp_lib_byte >= 201603L
|
||||||
#endif // defined(GLOG_THREAD_LOCAL_STORAGE)
|
#endif // defined(GLOG_THREAD_LOCAL_STORAGE)
|
||||||
|
|
||||||
LogMessage::LogMessageData::LogMessageData()
|
LogMessage::LogMessageData::LogMessageData()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user