FastLED 3.9.15
Loading...
Searching...
No Matches

◆ ptr() [2/2]

template<typename... Types>
template<typename T>
const T * fl::Variant< Types >::ptr ( ) const
inline

Definition at line 117 of file variant.h.

117 {
118 if (!is<T>()) return nullptr;
119 // Use bit_cast_ptr for safe type-punning on properly aligned storage
120 // The storage is guaranteed to be properly aligned by alignas(max_align<Types...>::value)
122 }
char _storage[max_size< Types... >::value]
Definition variant.h:294
bool is() const noexcept
Definition variant.h:106
To * bit_cast_ptr(void *storage) noexcept
Definition bit_cast.h:54