diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-08 15:50:45 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-08 15:50:45 +0100 |
| commit | 386b6ba6702aaf121a8667b68fba86385dad68ed (patch) | |
| tree | 985c7eda4fafa827eaad88b6b469b0baba791817 /vendor/toml++/impl/std_string.hpp | |
| parent | 7a469801ecb55fcde0199d4e41b1cec3a17dcb05 (diff) | |
| parent | ddb1cbc831b6d13b985d91022f01e955e24ae871 (diff) | |
Merge pull request #25 from ne-foss-org/nebuild-patches-deref
[CHORE] Patching TOML manifest parser to avoid null deref.
Diffstat (limited to 'vendor/toml++/impl/std_string.hpp')
| -rw-r--r-- | vendor/toml++/impl/std_string.hpp | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/vendor/toml++/impl/std_string.hpp b/vendor/toml++/impl/std_string.hpp index b75afaf..5230661 100644 --- a/vendor/toml++/impl/std_string.hpp +++ b/vendor/toml++/impl/std_string.hpp @@ -1,18 +1,17 @@ -//# This file is a part of toml++ and is subject to the the terms of the MIT license. -//# Copyright (c) Mark Gillard <mark.gillard@outlook.com.au> -//# See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. -// SPDX-License-Identifier: MIT +// # This file is a part of toml++ and is subject to the the terms of the MIT license. +// # Copyright (c) Mark Gillard <mark.gillard@outlook.com.au> +// # See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. +// SPDX-License-Identifier: MIT #pragma once #include "preprocessor.hpp" TOML_DISABLE_WARNINGS; -#include <string_view> #include <string> +#include <string_view> TOML_ENABLE_WARNINGS; -#if TOML_DOXYGEN \ - || (defined(__cpp_char8_t) && __cpp_char8_t >= 201811 && defined(__cpp_lib_char8_t) \ - && __cpp_lib_char8_t >= 201907) +#if TOML_DOXYGEN || (defined(__cpp_char8_t) && __cpp_char8_t >= 201811 && \ + defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201907) #define TOML_HAS_CHAR8 1 #else #define TOML_HAS_CHAR8 0 @@ -20,34 +19,33 @@ TOML_ENABLE_WARNINGS; /// \cond -namespace toml // non-abi namespace; this is not an error +namespace toml // non-abi namespace; this is not an error { - using namespace std::string_literals; - using namespace std::string_view_literals; -} +using namespace std::string_literals; +using namespace std::string_view_literals; +} // namespace toml #if TOML_ENABLE_WINDOWS_COMPAT -TOML_IMPL_NAMESPACE_START -{ - TOML_NODISCARD - TOML_EXPORTED_FREE_FUNCTION - std::string narrow(std::wstring_view); +TOML_IMPL_NAMESPACE_START { + TOML_NODISCARD + TOML_EXPORTED_FREE_FUNCTION + std::string narrow(std::wstring_view); - TOML_NODISCARD - TOML_EXPORTED_FREE_FUNCTION - std::wstring widen(std::string_view); + TOML_NODISCARD + TOML_EXPORTED_FREE_FUNCTION + std::wstring widen(std::string_view); #if TOML_HAS_CHAR8 - TOML_NODISCARD - TOML_EXPORTED_FREE_FUNCTION - std::wstring widen(std::u8string_view); + TOML_NODISCARD + TOML_EXPORTED_FREE_FUNCTION + std::wstring widen(std::u8string_view); #endif } TOML_IMPL_NAMESPACE_END; -#endif // TOML_ENABLE_WINDOWS_COMPAT +#endif // TOML_ENABLE_WINDOWS_COMPAT /// \endcond |
