Is array/vector of unique_ptr guaranteed to be array of raw pointers internally. It seems like it is so on my machine, but does the standard guarantee it?
I guess the question can be reduced to: Does unique_ptr always remain in memory as only a raw pointer or it's possible to have other metadata saved with it.
Basically i need to call a c function which takes an array of pointers (Actually it takes a double pointer obviously). Now I can pass it a vector (vector::data) of unique_ptr with proper casting and it works fine. But I want to ensure that it will remain so on all the implementation of c++.
using item_ptr = unique_ptr<ITEM, ITEM_destructor>;
vector<item_ptr> items;
set_menu_items(m, reinterpret_cast<ITEM **>(items.data()));