libstdc++: Add missing 'inline' to always_inline function

This fixes a -Wattributes warning for the COW std::string which was
previously suppressed due to being in a system header.

libstdc++-v3/ChangeLog:

	* include/bits/cow_string.h (__resize_for_overwrite): Add
	inline keyword to function with always_inline attribute.
This commit is contained in:
Jonathan Wakely 2024-09-26 23:36:46 +01:00 committed by Jonathan Wakely
parent 6a4d1c374e
commit 48e1b89f14
No known key found for this signature in database

View file

@ -3765,7 +3765,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _CharT, typename _Traits, typename _Alloc>
template<typename _Operation>
[[__gnu__::__always_inline__]]
void
inline void
basic_string<_CharT, _Traits, _Alloc>::
__resize_and_overwrite(const size_type __n, _Operation __op)
{ resize_and_overwrite<_Operation&>(__n, __op); }