#include #include struct Empty {}; struct Identity { int operator()(int value) const { return value; } }; struct ViaBase : Empty { int value = 3; }; struct WithPolicy { [[no_unique_address]] Identity policy; int value = 7; int evaluate() const { return policy(value); } }; struct TwoTags { [[no_unique_address]] Empty first; [[no_unique_address]] Empty second; int value = 1; }; int main() { static_assert(std::is_empty_v); static_assert(sizeof(Empty) >= 1); Empty array[2]; assert(&array[0] != &array[1]); ViaBase inherited; WithPolicy composed; TwoTags tags; assert(inherited.value == 3); assert(composed.evaluate() == 7); assert(&tags.first != &tags.second); }