diff --git a/include/kstd/streams/stream.hpp b/include/kstd/streams/stream.hpp index c6b1ddd..1eef91c 100644 --- a/include/kstd/streams/stream.hpp +++ b/include/kstd/streams/stream.hpp @@ -52,6 +52,16 @@ return x; \ } +#define KSTD_RCAST_FIELD_FUNCTOR(n, t) \ + [](auto& value) noexcept -> auto { \ + return reinterpret_cast(value.n); \ + } + +#define KSTD_SCAST_FIELD_FUNCTOR(n, t) \ + [](auto& value) noexcept -> auto { \ + return static_cast(value.n); \ + } + namespace kstd::streams { template struct Stream final {