Код: Выделить всё
func_call(auto(arg1), auto(arg2));
< /code>
Вот весь код, я прокомментировал бит, о котором я имею в виду, это внизу: < /p>
#if __cplusplus > 202002L
template
template
constexpr void
basic_string::
resize_and_overwrite(const size_type __n, _Operation __op)
{
const size_type __capacity = capacity();
_CharT* __p;
if (__n > __capacity)
{
auto __new_capacity = __n; // Must not allow _M_create to modify __n.
__p = _M_create(__new_capacity, __capacity);
this->_S_copy(__p, _M_data(), length()); // exclude trailing null
#if __cpp_lib_is_constant_evaluated
if (std::is_constant_evaluated())
traits_type::assign(__p + length(), __n - length(), _CharT());
#endif
_M_dispose();
_M_data(__p);
_M_capacity(__new_capacity);
}
else
__p = _M_data();
struct _Terminator {
constexpr ~_Terminator() { _M_this->_M_set_length(_M_r); }
basic_string* _M_this;
size_type _M_r;
};
_Terminator __term{this};
auto __r = std::move(__op)(auto(__p), auto(__n)); // = 0 && __r __n)
__builtin_unreachable();
}
#endif // C++23
Подробнее здесь: https://stackoverflow.com/questions/796 ... oarg2-mean
Мобильная версия