@@ -4169,28 +4169,28 @@ inline std::size_t concat_length()
4169
4169
}
4170
4170
4171
4171
template<typename... Args>
4172
- inline std::size_t concat_length(const char* cstr, Args& & ... rest);
4172
+ inline std::size_t concat_length(const char* cstr, const Args& ... rest);
4173
4173
4174
4174
template<typename StringType, typename... Args>
4175
- inline std::size_t concat_length(const StringType& str, Args& & ... rest);
4175
+ inline std::size_t concat_length(const StringType& str, const Args& ... rest);
4176
4176
4177
4177
template<typename... Args>
4178
- inline std::size_t concat_length(const char /*c*/, Args& & ... rest)
4178
+ inline std::size_t concat_length(const char /*c*/, const Args& ... rest)
4179
4179
{
4180
- return 1 + concat_length(std::forward<Args>( rest) ...);
4180
+ return 1 + concat_length(rest...);
4181
4181
}
4182
4182
4183
4183
template<typename... Args>
4184
- inline std::size_t concat_length(const char* cstr, Args& & ... rest)
4184
+ inline std::size_t concat_length(const char* cstr, const Args& ... rest)
4185
4185
{
4186
4186
// cppcheck-suppress ignoredReturnValue
4187
- return ::strlen(cstr) + concat_length(std::forward<Args>( rest) ...);
4187
+ return ::strlen(cstr) + concat_length(rest...);
4188
4188
}
4189
4189
4190
4190
template<typename StringType, typename... Args>
4191
- inline std::size_t concat_length(const StringType& str, Args& & ... rest)
4191
+ inline std::size_t concat_length(const StringType& str, const Args& ... rest)
4192
4192
{
4193
- return str.size() + concat_length(std::forward<Args>( rest) ...);
4193
+ return str.size() + concat_length(rest...);
4194
4194
}
4195
4195
4196
4196
template<typename OutStringType>
@@ -4281,7 +4281,7 @@ template<typename OutStringType = std::string, typename... Args>
4281
4281
inline OutStringType concat(Args && ... args)
4282
4282
{
4283
4283
OutStringType str;
4284
- str.reserve(concat_length(std::forward<Args>( args) ...));
4284
+ str.reserve(concat_length(args...));
4285
4285
concat_into(str, std::forward<Args>(args)...);
4286
4286
return str;
4287
4287
}
0 commit comments