[PATCH] D56997: Fix implementation of P0966 - string::reserve Should Not Shrink

Marshall Clow via Phabricator reviews at reviews.llvm.org
Tue Jan 22 20:12:07 PST 2019


mclow.lists added a comment.

In D56997#1367223 <https://reviews.llvm.org/D56997#1367223>, @andrewluo wrote:

> Made some changes to keep behavior the same in older -std= dialects.  We shouldn't overload the function to avoid code such as:
>
> auto f(&::std::string::reserve); // Ambiguous post C++17
>
> from breaking for std < 17 (will break if -std=c++2a however)


Users are not allowed to take the address of standard library member functions.
See [member.functions]/2 for a description of why - the function you want to take an address of may not exist.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56997/new/

https://reviews.llvm.org/D56997





More information about the libcxx-commits mailing list