A round of new universal capabilities (all generic — templated/reflection based, no app coupling), verified by the test suite (1103 passing): Data reflection: - Reflect.hpp now (de)serializes chrono::duration, chrono::time_point, std::variant (tagged), std::array, and non-string-keyed std::map; Meta.hpp gains is_time_point_v et al. Async: - EventBus gains Mode::Async (worker-thread dispatch + flush()). - ThreadPool gains a bounded queue, try_submit(), and rejection stats. New modules / containers: - Resilience: TokenBucket, KeyedRateLimiter<Key>, CircuitBreaker, ResourceMonitor. - Containers: BufferPool<T> (size-class buffer reuse) and Cache<K,V> (per-entry TTL, LRU/LFU/FIFO eviction, hit/miss stats). - System: process/CPU/memory metrics (Metrics.hpp) and a streaming Process API. Plus FSM v2 (typed Success/Failure, sub-machines, parallel regions, history states, deferred events), Configuration/Logging reflection helpers, and the accompanying test suites. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
25 lines
671 B
C++
25 lines
671 B
C++
#pragma once
|
|
|
|
#include <Void/Core/Meta.hpp>
|
|
|
|
#include <string>
|
|
|
|
#ifdef VOID_HAS_META_REFLECTION
|
|
#define VOID_RESULT_HAS_REFLECTION 1
|
|
#endif
|
|
|
|
namespace Void::Result::Detail
|
|
{
|
|
/// Render a value for diagnostic / log output. Thin alias over the shared
|
|
/// reflection layer `Void::Meta::repr`:
|
|
/// 1. std::formatter<T> → std::format("{}", v)
|
|
/// 2. a `.format()` method returning something string-convertible
|
|
/// 3. C++26 reflection: `Type{field1: value1, field2: value2}`
|
|
/// 4. otherwise `"<unrepresentable>"`
|
|
template <typename T> [[nodiscard]] std::string repr(const T& value)
|
|
{
|
|
return Void::Meta::repr(value);
|
|
}
|
|
|
|
} // namespace Void::Result::Detail
|