diff --git a/include/ankerl/svector.h b/include/ankerl/svector.h index 93ff91a..f5117e3 100644 --- a/include/ankerl/svector.h +++ b/include/ankerl/svector.h @@ -183,6 +183,8 @@ template class svector { static_assert(MinInlineCapacity <= 127, "sorry, can't have more than 127 direct elements"); static constexpr auto N = detail::automatic_capacity(MinInlineCapacity); + static constexpr auto alignment_of_t = std::alignment_of_v; + static constexpr auto offset_to_indirect_data = detail::round_up(sizeof(detail::header), alignment_of_t); enum class direction { direct, indirect }; diff --git a/svector.natvis b/svector.natvis new file mode 100644 index 0000000..2ff5942 --- /dev/null +++ b/svector.natvis @@ -0,0 +1,24 @@ + + + + svector + + + m_data[0] >> 1 + + m_data[0] >> 1 + (value_type*)((char*)&m_data + alignment_of_t) + + + (*(detail::header**)&m_data)->m_size + + (*(detail::header**)&m_data)->m_size + (value_type*)((char*)(*(detail::header**)&m_data) + offset_to_indirect_data) + + + +