It doesn't look like an error of the corresponding implementation to me,
because the requirements imposed by the Standard don't seem to be
specific enough to prevent it to from being an infeasible
implementation.
For a contiguous container (such as std::vector), such a choice seems
rather reasonable, but given your use-case of a typical node-based
container such as std::list, this choice seems not very appropriate. I
see the following options for you:
1) You could make a feature request to your Library vendor(s) to use a
different implementation of std::list<>::max_size() that would cover
this kind of use-case as well. You might have luck, when the vendor
agrees, but in any case this would not be something that you could rely
on when switching between implementations.
2) You could consider to submit a library issue (as described on
https://isocpp.org/std/submit-issue when it refers to standard library
issues), requesting that the standard should at least for some dedicated
container types (such as std::list), specify the semantics of the
container's max_size() function in a more specific way, that would
support your example. Since this could me considered as a feature-like
request, your attempt might be rejected by the committee as being
not-a-defect (NAD). This strongly depends on the clarity of your issue
description and argumentation.
3) You could write a proposal (see
https://isocpp.org/std/submit-a-proposal), that argues why the current
specification of max_size() at least for some containers should be
changed to a more specific requirement, that would support examples like
yours. As described on the referenced page, you should start with a new
discussion on the std-proposals news group
(
https://groups.google.com/a/isocpp.org/forum/?fromgroups#!forum/std-pro
posals).
For any of these options it is always a good idea to have a better
suggestion how to implement max_size() for e.g. std::list and if so, to
try to convince implementations to accept such an alternative. You could
for example try to make a contribution to gcc's libstdc++ in regard to
this. Existing implementations are often a good argumentation base for
requesting a change of the existing specification.
HTH & Greetings from Bremen,
Daniel Krügler