#pragma once #include #include #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 → std::format("{}", v) /// 2. a `.format()` method returning something string-convertible /// 3. C++26 reflection: `Type{field1: value1, field2: value2}` /// 4. otherwise `""` template [[nodiscard]] std::string repr(const T& value) { return Void::Meta::repr(value); } } // namespace Void::Result::Detail