–– copy‐construct via table
| 239 | |
| 240 | // –– copy‐construct via table |
| 241 | void copy_construct_from(const variant &other) FL_NOEXCEPT { |
| 242 | using Fn = void (*)(void *, const variant &); |
| 243 | FL_DISABLE_WARNING_PUSH |
| 244 | FL_DISABLE_WARNING(array-bounds) |
| 245 | static constexpr Fn table[] = {&variant::template copy_fn<Types>...}; |
| 246 | table[other._tag - 1](&_storage, other); |
| 247 | FL_DISABLE_WARNING_POP |
| 248 | _tag = other._tag; |
| 249 | } |
| 250 | |
| 251 | template <typename T> |
| 252 | static void copy_fn(void *storage, const variant &other) FL_NOEXCEPT { |