template<std::size_t N, class T> requires std::is_aggregate_v<std::remove_cvref_t<T>>
[[nodiscard]] constexpr auto offset_of() noexcept -> std::size_t {
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundefined-var-template"
#endif
const auto& unknown = detail::ext<detail::uninitialized<T>>;
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
const void* address = __builtin_addressof(get<N>(unknown.value));
for (std::size_t i = 0; i < sizeof(unknown.bytes); ++i) {
if (address == &unknown.bytes[i]) {
return i;
}
}
#if defined(__clang__)
__builtin_unreachable();
#endif
}