Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
Loading...
Searching...
No Matches
compatibility.h
Go to the documentation of this file.
1// BSD 3-Clause License
2// Copyright (c) 2021-2025, 🍀☀🌕🌥 🌊
3// See the LICENSE file in the project root for full license information.
4
11#pragma once
12
13// Forward declare canonical namespaces to allow aliasing without including
14// heavier headers.
15namespace kcenon {
16namespace thread {
17namespace core {}
18namespace interfaces {}
19namespace impl {}
20namespace utils {}
21namespace detail {}
22} // namespace thread
23} // namespace kcenon
24
25// Legacy namespace aliases. These remain until dependent projects
26// migrate to the unified kcenon::thread namespace.
27//
28// @deprecated Since v1.0.0. These aliases will be removed in v2.0.0.
29// Use `kcenon::thread` and `kcenon::thread::utils` directly instead.
30//
31// NOTE: The C++ standard does not support `[[deprecated]]` on namespace
32// aliases (only on namespace definitions). Consumers that need compile-time
33// warnings should migrate include-by-include; an include-guard warning is
34// emitted once per translation unit below (suppressible by defining
35// THREAD_SUPPRESS_LEGACY_NAMESPACE_WARNING before the include).
39
40// Legacy utility namespace names still expected by some consumers.
42
43#if !defined(THREAD_SUPPRESS_LEGACY_NAMESPACE_WARNING) \
44 && !defined(KCENON_THREAD_COMPATIBILITY_H_WARNED)
45#define KCENON_THREAD_COMPATIBILITY_H_WARNED 1
46#if defined(_MSC_VER)
47#pragma message("thread_system/thread_module/thread_namespace/utility_module namespace aliases are deprecated since v1.0.0 and will be removed in v2.0.0. Use 'kcenon::thread' directly. Define THREAD_SUPPRESS_LEGACY_NAMESPACE_WARNING to silence this warning.")
48#elif defined(__GNUC__) || defined(__clang__)
49#pragma message "thread_system/thread_module/thread_namespace/utility_module namespace aliases are deprecated since v1.0.0 and will be removed in v2.0.0. Use 'kcenon::thread' directly. Define THREAD_SUPPRESS_LEGACY_NAMESPACE_WARNING to silence this warning."
50#endif
51#endif
Core threading foundation of the thread system library.
Definition thread_impl.h:17