diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2023-12-14 07:54:29 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2023-12-14 08:21:54 +0300 |
commit | db7f91de8c86629d479db1daf8dddf9704186478 (patch) | |
tree | d0175a4e634ef25468fa1b78c8ef71c56f074e53 /contrib/restricted/nlohmann_json/include/nlohmann/detail/string_concat.hpp | |
parent | e938f3027e06f8f4f3f2f0d79d0262d91caac192 (diff) | |
download | ydb-db7f91de8c86629d479db1daf8dddf9704186478.tar.gz |
Update contrib/restricted/nlohmann_json to 3.11.3
Diffstat (limited to 'contrib/restricted/nlohmann_json/include/nlohmann/detail/string_concat.hpp')
-rw-r--r-- | contrib/restricted/nlohmann_json/include/nlohmann/detail/string_concat.hpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/contrib/restricted/nlohmann_json/include/nlohmann/detail/string_concat.hpp b/contrib/restricted/nlohmann_json/include/nlohmann/detail/string_concat.hpp index 59725ca825..f49e8d215e 100644 --- a/contrib/restricted/nlohmann_json/include/nlohmann/detail/string_concat.hpp +++ b/contrib/restricted/nlohmann_json/include/nlohmann/detail/string_concat.hpp @@ -1,9 +1,9 @@ // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 +// | | |__ | | | | | | version 3.11.3 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me> +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> // SPDX-License-Identifier: MIT #pragma once @@ -25,28 +25,28 @@ inline std::size_t concat_length() } template<typename... Args> -inline std::size_t concat_length(const char* cstr, Args&& ... rest); +inline std::size_t concat_length(const char* cstr, const Args& ... rest); template<typename StringType, typename... Args> -inline std::size_t concat_length(const StringType& str, Args&& ... rest); +inline std::size_t concat_length(const StringType& str, const Args& ... rest); template<typename... Args> -inline std::size_t concat_length(const char /*c*/, Args&& ... rest) +inline std::size_t concat_length(const char /*c*/, const Args& ... rest) { - return 1 + concat_length(std::forward<Args>(rest)...); + return 1 + concat_length(rest...); } template<typename... Args> -inline std::size_t concat_length(const char* cstr, Args&& ... rest) +inline std::size_t concat_length(const char* cstr, const Args& ... rest) { // cppcheck-suppress ignoredReturnValue - return ::strlen(cstr) + concat_length(std::forward<Args>(rest)...); + return ::strlen(cstr) + concat_length(rest...); } template<typename StringType, typename... Args> -inline std::size_t concat_length(const StringType& str, Args&& ... rest) +inline std::size_t concat_length(const StringType& str, const Args& ... rest) { - return str.size() + concat_length(std::forward<Args>(rest)...); + return str.size() + concat_length(rest...); } template<typename OutStringType> @@ -137,7 +137,7 @@ template<typename OutStringType = std::string, typename... Args> inline OutStringType concat(Args && ... args) { OutStringType str; - str.reserve(concat_length(std::forward<Args>(args)...)); + str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; } |