For strings, SSO poses already a challenge (e.g. there may be no extra allocated memory to detach, what happens?).
In this case ideally let the user handle it manually. Though for simplicity, you could choose to let std::string make a copy and then hand it over (also SSO need not necessarily be implemented).
In general, it is perfectly legitimate for a vector/string implementation to be like this:
template <class T> class vector {
vector_data<T> *data;
};
where `data` is nullptr in case of 0 capacity, otherwise points to a "dynamically sized" data structure like:
struct vector_data {
size_t size;
size_t capacity;
T actual_data[1]; // not really 1, but #capacity elements
};
In this case you can't just attach/detach a contiguous array of T*; there's no such thing.
Do these implementations exist? Will they ever see C++26?
Hence the need of surveying them.