14 static_assert(std::is_object_v<T> && !std::is_array_v<T> &&
15 std::same_as<T, std::remove_cv_t<T>>);
16 static constexpr bool packable = std::is_integral_v<T> &&
17 std::is_unsigned_v<T> &&
18 std::numeric_limits<T>::digits <= 64;
19 static_assert(Requested == ElementStorage::automatic ||
20 Requested == ElementStorage::packed ||
21 Requested == ElementStorage::indirect);
22 static_assert(Requested != ElementStorage::packed || packable,
23 "Packed elements must be bool or unsigned integers <=64 bits");
25 Requested == ElementStorage::automatic
26 ? (packable ? ElementStorage::packed : ElementStorage::indirect)
28 static constexpr bool packed = storage == ElementStorage::packed;
30 packed || (std::is_nothrow_move_constructible_v<T> &&
31 std::is_nothrow_destructible_v<T>),
32 "Indirect elements require noexcept move construction/destruction");
33 using const_reference = std::conditional_t<packed, T, const T&>;