| 124 | } |
| 125 | |
| 126 | template <typename T> const T *ptr() const FL_NOEXCEPT { |
| 127 | if (!is<T>()) return nullptr; |
| 128 | // Use bit_cast_ptr for safe type-punning on properly aligned storage |
| 129 | // The storage is guaranteed to be properly aligned by alignas(max_align<Types...>::value) |
| 130 | return fl::bit_cast_ptr<const T>(&_storage[0]); |
| 131 | } |
| 132 | |
| 133 | /// @brief Get a reference to the stored value of type T |
| 134 | /// @tparam T The type to retrieve |
no outgoing calls
no test coverage detected