summaryrefslogtreecommitdiffhomepage
path: root/vendor/toml++/impl/std_string.hpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-07-24 09:15:17 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-07-24 09:15:17 +0100
commita3ea256d00e5aac45574c7c8b076b60630f73a95 (patch)
treed639c686922140ee0465b27964ce4d2b854b68b7 /vendor/toml++/impl/std_string.hpp
parentbb11d32131e786b40550375005b12bcb31cf25d7 (diff)
feat! refactor! Breaking changes of the NeBuild system.
Working on a TOML backend, refactored source code namespace. And add 'toml++' vendor library. See commit details. Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'vendor/toml++/impl/std_string.hpp')
-rw-r--r--vendor/toml++/impl/std_string.hpp53
1 files changed, 53 insertions, 0 deletions
diff --git a/vendor/toml++/impl/std_string.hpp b/vendor/toml++/impl/std_string.hpp
new file mode 100644
index 0000000..b75afaf
--- /dev/null
+++ b/vendor/toml++/impl/std_string.hpp
@@ -0,0 +1,53 @@
+//# 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>
+TOML_ENABLE_WARNINGS;
+
+#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
+#endif
+
+/// \cond
+
+namespace toml // non-abi namespace; this is not an error
+{
+ using namespace std::string_literals;
+ using namespace std::string_view_literals;
+}
+
+#if TOML_ENABLE_WINDOWS_COMPAT
+
+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);
+
+#if TOML_HAS_CHAR8
+
+ TOML_NODISCARD
+ TOML_EXPORTED_FREE_FUNCTION
+ std::wstring widen(std::u8string_view);
+
+#endif
+}
+TOML_IMPL_NAMESPACE_END;
+
+#endif // TOML_ENABLE_WINDOWS_COMPAT
+
+/// \endcond