From 21fc2991318f5cfdc7ee6f3e2d5b9000f7a6eaab Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Wed, 4 Jun 2025 15:16:53 -0700 Subject: [PATCH] src/3rdparty: Move jthread/stop_token out of std namespace to prevent collisions --- src/3rdparty/jthread.hpp | 4 ++-- src/3rdparty/stop_token.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/3rdparty/jthread.hpp b/src/3rdparty/jthread.hpp index b9ad2bca2c..3d66bcef94 100644 --- a/src/3rdparty/jthread.hpp +++ b/src/3rdparty/jthread.hpp @@ -15,7 +15,7 @@ #include "stop_token.hpp" -namespace std { +namespace nonstd { //***************************************** //* class jthread @@ -148,6 +148,6 @@ inline void jthread::swap(jthread& t) noexcept { } -} // namespace std +} // namespace nonstd #endif // JTHREAD_HPP diff --git a/src/3rdparty/stop_token.hpp b/src/3rdparty/stop_token.hpp index 4a7bcbbb88..e0a7c8ddeb 100644 --- a/src/3rdparty/stop_token.hpp +++ b/src/3rdparty/stop_token.hpp @@ -16,7 +16,7 @@ #include #endif -namespace std { +namespace nonstd { inline void __spin_yield() noexcept { // TODO: Platform-specific code here #if defined(__x86_64__) || defined(_M_X64) @@ -507,4 +507,4 @@ private: template stop_callback(stop_token, _Callback) -> stop_callback<_Callback>; -} // namespace std +} // namespace nonstd