[libcxx-commits] [PATCH] D144580: [libc++] Inline small constructors into basic_string

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Feb 26 04:22:35 PST 2023


Mordante added a comment.

In D144580#4152479 <https://reviews.llvm.org/D144580#4152479>, @philnik wrote:

> In D144580#4152448 <https://reviews.llvm.org/D144580#4152448>, @Mordante wrote:
>
>> In general I like this. Did you see a change in binary size or performance with this change?
>
> I don't have a large code base to check, but here is a small example: https://godbolt.org/z/oYj76b78K (everything is implicitly inline because of `constexpr` in C++20)

This looks nice :-)

I see the patch failed to apply in the CI, can you fix that?

No other comments, but I like to see a CI run before approving.



================
Comment at: libcxx/include/string:995
+                          int> = 0>
   _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
+  basic_string(const _Tp& __t, size_type __pos, size_type __n, const allocator_type& __a = allocator_type())
----------------
philnik wrote:
> Mordante wrote:
> > Has this change an effect due to the `_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS`?
> No, I missed these ones in D128081.
Thanks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144580



More information about the libcxx-commits mailing list