Container System 0.1.0
High-performance C++20 type-safe container framework with SIMD-accelerated serialization
Loading...
Searching...
No Matches
async.h
Go to the documentation of this file.
1// BSD 3-Clause License
2// Copyright (c) 2024, 🍀☀🌕🌥 🌊
3// See the LICENSE file in the project root for full license information.
4
24#pragma once
25
26// Feature detection
27#if defined(__cpp_impl_coroutine) && __cpp_impl_coroutine >= 201902L
28 #define CONTAINER_HAS_COROUTINES 1
29#elif defined(_MSC_VER) && _MSC_VER >= 1928
30 // MSVC 2019 16.8+ has coroutine support
31 #define CONTAINER_HAS_COROUTINES 1
32#else
33 #define CONTAINER_HAS_COROUTINES 0
34#endif
35
36#if CONTAINER_HAS_COROUTINES
37
38#include "task.h"
39#include "generator.h"
41#include "async_container.h"
42
44{
48 inline constexpr bool has_coroutine_support = true;
49
50} // namespace kcenon::container::async
51
52#else
53
54// Fallback when coroutines are not available
56{
60 inline constexpr bool has_coroutine_support = false;
61
62} // namespace kcenon::container::async
63
64#endif // CONTAINER_HAS_COROUTINES
Async wrapper for value_container operations.
C++20 coroutine generator for lazy sequence generation.
constexpr bool has_coroutine_support
Check if coroutines are available at compile time.
Definition async.h:60
C++20 coroutine task type for async operations.
Thread pool executor integration for async operations.