I am using an external library, and they have a particular convention with their classes that makes no sense to me. They will declare them like this:
class SomeClass
{
public:
using allocator_type = ::std::allocator<uint8_t>;
SomeClass() noexcept :
SomeClass(allocator_type())
{}
explicit SomeClass(const allocator_type& allocator) noexcept;
...
They take the default allocator as an argument for internal allocation. But the default allocator is not customizable, I don't see how I could control the memory at all. It is stateless, and will always allocate globally with new(). It seems like they should have used an interface with virtual functions, or a templated class to be defined by the user.
This convention seems completely pointless, which makes me feel like I must be missing something. Am I right about this, or is there some purpose here that I don't get?
std::vector.