[all-commits] [llvm/llvm-project] f3394d: [libc++] Fix wrongly non-inline basic_string::shri...

Louis Dionne via All-commits all-commits at lists.llvm.org
Tue Dec 14 08:14:07 PST 2021


  Branch: refs/heads/release/13.x
  Home:   https://github.com/llvm/llvm-project
  Commit: f3394dc82c20feea943293eda162b5aff2930ac9
      https://github.com/llvm/llvm-project/commit/f3394dc82c20feea943293eda162b5aff2930ac9
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2021-12-14 (Tue, 14 Dec 2021)

  Changed paths:
    M libcxx/include/string
    A libcxx/test/std/strings/basic.string/string.capacity/shrink_to_fit.explicit_instantiation.sh.cpp

  Log Message:
  -----------
  [libc++] Fix wrongly non-inline basic_string::shrink_to_fit

As explained in https://stackoverflow.com/a/70339311/627587, the fact
that shrink_to_fit wasn't defined as inline lead to issues when explicitly
instantiating basic_string. While explicit instantiations are always
somewhat brittle, this one was clearly a bug on our end.

Differential Revision: https://reviews.llvm.org/D115656

(cherry picked from commit bf39e7dc6c48c236a98abfc1027d816c6eab692f)




More information about the All-commits mailing list