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

◆ copy_fn()

template<typename... Types>
template<typename T>
static void fl::Variant< Types >::copy_fn ( void * storage,
const Variant< Types > & other )
inlinestaticprivate

Definition at line 237 of file variant.h.

237 {
238 // Use bit_cast_ptr for safe type-punning on properly aligned storage
239 // The storage is guaranteed to be properly aligned by alignas(max_align<Types...>::value)
241 new (storage) T(*source_ptr);
242 }
char _storage[max_size< Types... >::value]
Definition variant.h:294
To * bit_cast_ptr(void *storage) noexcept
Definition bit_cast.h:54