https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124787

--- Comment #3 from Pali Rohár <pali at kernel dot org> ---
Thank you very much for the explanation.

Sometimes it is really hard to figure out what is happening, specially when
everything is working fine for my_allocator1 (even std::deque). And the only
failure is for my_allocator2 and only for std::deque (my_allocator2 works for
std::vector and std::list). And I was really confused here because
my_allocator1 and my_allocator2 are defined in the exactly same way (they
differs only in parent from which inherits).

It would be nice if std:: containers were able to validate supplied allocator
if it meet all requirements, and throw compile errors (or warnings) for all
usage, not just in std::deque.

Reply via email to