MCPcopy Create free account
hub / github.com/FastLED/FastLED / move_construct_from

Function move_construct_from

src/fl/stl/variant.h:260–269  ·  view source on GitHub ↗

–– move‐construct via table

Source from the content-addressed store, hash-verified

258
259 // –– move‐construct via table
260 void move_construct_from(variant &other) FL_NOEXCEPT {
261 using Fn = void (*)(void *, variant &);
262 FL_DISABLE_WARNING_PUSH
263 FL_DISABLE_WARNING(array-bounds)
264 static constexpr Fn table[] = {&variant::template move_fn<Types>...};
265 table[other._tag - 1](&_storage, other);
266 FL_DISABLE_WARNING_POP
267 _tag = other._tag;
268 other.reset();
269 }
270
271 template <typename T> static void move_fn(void *storage, variant &other) FL_NOEXCEPT {
272 // Use bit_cast_ptr for safe type-punning on properly aligned storage

Callers 2

variantFunction · 0.85
variant.hFile · 0.85

Calls 1

resetMethod · 0.45

Tested by

no test coverage detected