]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Force-inline shared_ptr::operator bool() for C++20 [PR108636]
authorJonathan Wakely <jwakely@redhat.com>
Thu, 1 Feb 2024 18:37:34 +0000 (18:37 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 2 Feb 2024 10:35:06 +0000 (10:35 +0000)
commit4b36925576d1097b20cddd29cf96c5b9ecfffc3d
tree917ebed952bf0a7d3dd9811554d9e75b8e6c4753
parent48cc874ac072d7f894bbded0b0ac33ea11368121
libstdc++: Force-inline shared_ptr::operator bool() for C++20 [PR108636]

This avoids a linker error with -fkeep-inline-functions when including
<filesystem>. We can't backport the fix from trunk because it adds an
export to the shared library. By marking the "missing" symbol
always_inline for C++20 mode we don't need a definition in the library.

libstdc++-v3/ChangeLog:

PR libstdc++/108636
* include/bits/shared_ptr_base.h (__shared_ptr::operator bool):
Add always_inline attribute for C++20 and later.
libstdc++-v3/include/bits/shared_ptr_base.h