| 182 | // wrong type or if Any was empty. |
| 183 | template <typename T> |
| 184 | [[nodiscard]] T* castPtr() |
| 185 | { |
| 186 | static_assert(!std::is_same_v<T, float>, "The value has been casted internally to " |
| 187 | "[double]. Use that instead"); |
| 188 | |
| 189 | return _any.empty() ? nullptr : linb::any_cast<T>(&_any); |
| 190 | } |
| 191 | |
| 192 | // This is the original type |
| 193 | [[nodiscard]] const std::type_index& type() const noexcept |