AIUI the problem in C++ was that until C++ 20 it didn't have a slice type and so you couldn't communicate that you aren't allocating or de-allocating anything and so you don't care about allocators. Which means if you use either Allocator mechanism in C++ every part of the software needs to care about allocators. Rust doesn't have that problem
Vec<u8,Goose> and Vec<u8,Global> both implement AsRef<[u8]> and AsMut<[u8]> which means code which doesn't want to grow or shrink the Vec needn't care about the Goose allocator or interact with it in any way.
In C++ today you can write this way using std::span<T> from C++ 20, and enough people write C++ 20 that it probably won't cause overwhelming anger from people you've shut out, but in C++ 17 it could not be expressed at all, so that means even today some places cannot use your code.
AIUI the problem in C++ was that until C++ 20 it didn't have a slice type and so you couldn't communicate that you aren't allocating or de-allocating anything and so you don't care about allocators. Which means if you use either Allocator mechanism in C++ every part of the software needs to care about allocators. Rust doesn't have that problem
Vec<u8,Goose> and Vec<u8,Global> both implement AsRef<[u8]> and AsMut<[u8]> which means code which doesn't want to grow or shrink the Vec needn't care about the Goose allocator or interact with it in any way.
In C++ today you can write this way using std::span<T> from C++ 20, and enough people write C++ 20 that it probably won't cause overwhelming anger from people you've shut out, but in C++ 17 it could not be expressed at all, so that means even today some places cannot use your code.