[Bug libstdc++/87544] alloc-size-larger-than incorrectly triggered
gael.guennebaud at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Oct 7 12:06:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87544
--- Comment #2 from Gael Guennebaud <gael.guennebaud at gmail dot com> ---
Indeed, if I redefine max_size as follows instead of relying on std::allocator
then the warning is gone:
size_type max_size() const {
return std::numeric_limits<std::ptrdiff_t>::max()/sizeof(T);
}
More information about the Gcc-bugs
mailing list