2020-03-12 15:23:25 +00:00
|
|
|
//# This file is a part of toml++ and is subject to the the terms of the MIT license.
|
2021-01-02 15:48:47 +00:00
|
|
|
//# Copyright (c) Mark Gillard <mark.gillard@outlook.com.au>
|
2020-03-12 15:23:25 +00:00
|
|
|
//# See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text.
|
2020-04-10 16:46:00 +00:00
|
|
|
// SPDX-License-Identifier: MIT
|
2021-10-24 22:04:23 +00:00
|
|
|
#ifndef TOMLPLUSPLUS_H
|
|
|
|
#define TOMLPLUSPLUS_H
|
2020-03-12 15:23:25 +00:00
|
|
|
|
2021-10-24 22:04:23 +00:00
|
|
|
#define INCLUDE_TOMLPLUSPLUS_H // old guard name used pre-v3
|
2020-01-04 14:21:38 +00:00
|
|
|
|
2021-10-24 22:04:23 +00:00
|
|
|
//# Note: these would be included transitively as with any normal C++ project but
|
|
|
|
//# they're listed explicitly here because this file is used as the source for generate_single_header.py.
|
2020-01-04 14:21:38 +00:00
|
|
|
|
2021-10-23 09:22:41 +00:00
|
|
|
#include "impl/preprocessor.h"
|
2020-08-11 13:34:03 +00:00
|
|
|
|
2021-04-18 12:04:46 +00:00
|
|
|
TOML_PUSH_WARNINGS;
|
2021-10-29 13:28:04 +00:00
|
|
|
TOML_DISABLE_SPAM_WARNINGS;
|
|
|
|
TOML_DISABLE_SWITCH_WARNINGS;
|
2021-11-07 20:33:02 +00:00
|
|
|
TOML_DISABLE_SUGGEST_ATTR_WARNINGS;
|
2022-01-06 11:26:01 +00:00
|
|
|
|
|
|
|
// misc warning false-positives
|
2021-10-24 22:04:23 +00:00
|
|
|
#if TOML_MSVC
|
2022-01-06 11:26:01 +00:00
|
|
|
#pragma warning(disable : 5031) // #pragma warning(pop): likely mismatch
|
|
|
|
#elif TOML_CLANG
|
|
|
|
#pragma clang diagnostic ignored "-Wheader-hygiene"
|
|
|
|
#if TOML_CLANG >= 12
|
|
|
|
#pragma clang diagnostic ignored "-Wc++20-extensions"
|
2021-10-24 22:04:23 +00:00
|
|
|
#endif
|
2021-12-12 13:01:35 +00:00
|
|
|
#if TOML_CLANG == 13
|
2022-01-06 11:26:01 +00:00
|
|
|
#pragma clang diagnostic ignored "-Wreserved-identifier"
|
|
|
|
#endif
|
2021-12-12 13:01:35 +00:00
|
|
|
#endif
|
2020-08-11 13:34:03 +00:00
|
|
|
|
2021-10-24 22:04:23 +00:00
|
|
|
#include "impl/std_new.h"
|
|
|
|
#include "impl/std_string.h"
|
|
|
|
#include "impl/std_optional.h"
|
|
|
|
#include "impl/forward_declarations.h"
|
2021-10-23 09:22:41 +00:00
|
|
|
#include "impl/print_to_stream.h"
|
2021-10-24 22:04:23 +00:00
|
|
|
#include "impl/source_region.h"
|
|
|
|
#include "impl/date_time.h"
|
2022-01-06 11:26:01 +00:00
|
|
|
#include "impl/at_path.h"
|
2021-10-23 09:22:41 +00:00
|
|
|
#include "impl/node.h"
|
2021-10-24 22:04:23 +00:00
|
|
|
#include "impl/node_view.h"
|
2021-10-23 09:22:41 +00:00
|
|
|
#include "impl/value.h"
|
2021-10-24 22:04:23 +00:00
|
|
|
#include "impl/make_node.h"
|
2021-10-23 09:22:41 +00:00
|
|
|
#include "impl/array.h"
|
2021-11-12 17:37:02 +00:00
|
|
|
#include "impl/key.h"
|
2021-10-23 09:22:41 +00:00
|
|
|
#include "impl/table.h"
|
2022-01-04 14:23:45 +00:00
|
|
|
#include "impl/unicode.h"
|
2021-10-24 22:04:23 +00:00
|
|
|
#include "impl/parse_error.h"
|
|
|
|
#include "impl/parse_result.h"
|
|
|
|
#include "impl/parser.h"
|
2021-10-23 09:22:41 +00:00
|
|
|
#include "impl/formatter.h"
|
2021-10-30 12:56:14 +00:00
|
|
|
#include "impl/toml_formatter.h"
|
2021-10-23 09:22:41 +00:00
|
|
|
#include "impl/json_formatter.h"
|
2021-11-02 20:13:09 +00:00
|
|
|
#include "impl/yaml_formatter.h"
|
2020-04-10 16:46:00 +00:00
|
|
|
|
2020-03-02 10:14:54 +00:00
|
|
|
#if TOML_IMPLEMENTATION
|
2021-10-25 21:49:17 +00:00
|
|
|
|
|
|
|
#include "impl/std_string.inl"
|
|
|
|
#include "impl/print_to_stream.inl"
|
|
|
|
#include "impl/node.inl"
|
|
|
|
#include "impl/node_view.inl"
|
2022-01-06 11:26:01 +00:00
|
|
|
#include "impl/at_path.inl"
|
2021-10-25 21:49:17 +00:00
|
|
|
#include "impl/value.inl"
|
|
|
|
#include "impl/array.inl"
|
|
|
|
#include "impl/table.inl"
|
2022-01-04 14:23:45 +00:00
|
|
|
#include "impl/unicode.inl"
|
2021-10-25 21:49:17 +00:00
|
|
|
#include "impl/parser.inl"
|
|
|
|
#include "impl/formatter.inl"
|
2021-10-30 12:56:14 +00:00
|
|
|
#include "impl/toml_formatter.inl"
|
2021-10-25 21:49:17 +00:00
|
|
|
#include "impl/json_formatter.inl"
|
2021-11-02 20:13:09 +00:00
|
|
|
#include "impl/yaml_formatter.inl"
|
2021-10-25 21:49:17 +00:00
|
|
|
|
2021-10-24 22:04:23 +00:00
|
|
|
#endif // TOML_IMPLEMENTATION
|
2020-03-02 10:14:54 +00:00
|
|
|
|
2021-10-24 22:04:23 +00:00
|
|
|
TOML_POP_WARNINGS;
|
2020-08-11 13:34:03 +00:00
|
|
|
|
2020-02-18 21:29:59 +00:00
|
|
|
// macro hygiene
|
2020-01-04 14:21:38 +00:00
|
|
|
#if TOML_UNDEF_MACROS
|
2021-10-24 22:04:23 +00:00
|
|
|
#undef TOML_ABI_NAMESPACE_BOOL
|
|
|
|
#undef TOML_ABI_NAMESPACE_END
|
|
|
|
#undef TOML_ABI_NAMESPACE_START
|
|
|
|
#undef TOML_ABI_NAMESPACES
|
|
|
|
#undef TOML_ABSTRACT_BASE
|
|
|
|
#undef TOML_ALWAYS_INLINE
|
|
|
|
#undef TOML_ANON_NAMESPACE
|
|
|
|
#undef TOML_ANON_NAMESPACE_END
|
|
|
|
#undef TOML_ANON_NAMESPACE_START
|
|
|
|
#undef TOML_ARM
|
|
|
|
#undef TOML_ASSERT
|
2021-11-14 17:24:19 +00:00
|
|
|
#undef TOML_ASSERT_ASSUME
|
2021-10-24 22:04:23 +00:00
|
|
|
#undef TOML_ASSUME
|
|
|
|
#undef TOML_ASYMMETRICAL_EQUALITY_OPS
|
|
|
|
#undef TOML_ATTR
|
|
|
|
#undef TOML_CLANG
|
2021-11-07 14:35:31 +00:00
|
|
|
#undef TOML_CLOSED_ENUM
|
|
|
|
#undef TOML_CLOSED_FLAGS_ENUM
|
2021-10-24 22:04:23 +00:00
|
|
|
#undef TOML_COMPILER_EXCEPTIONS
|
2021-10-27 13:03:05 +00:00
|
|
|
#undef TOML_CONST_GETTER
|
|
|
|
#undef TOML_CONST_INLINE_GETTER
|
2021-10-24 22:04:23 +00:00
|
|
|
#undef TOML_CONSTRAINED_TEMPLATE
|
2022-01-06 11:26:01 +00:00
|
|
|
#undef TOML_CPP_VERSION
|
2022-01-05 14:47:00 +00:00
|
|
|
#undef TOML_DELETE_DEFAULTS
|
2021-10-24 22:04:23 +00:00
|
|
|
#undef TOML_DISABLE_ARITHMETIC_WARNINGS
|
|
|
|
#undef TOML_DISABLE_CODE_ANALYSIS_WARNINGS
|
|
|
|
#undef TOML_DISABLE_SPAM_WARNINGS
|
2021-11-06 16:59:47 +00:00
|
|
|
#undef TOML_DISABLE_SPAM_WARNINGS_CLANG_10
|
2021-10-27 13:03:05 +00:00
|
|
|
#undef TOML_DISABLE_SUGGEST_ATTR_WARNINGS
|
2021-10-24 22:04:23 +00:00
|
|
|
#undef TOML_DISABLE_SWITCH_WARNINGS
|
|
|
|
#undef TOML_DISABLE_WARNINGS
|
|
|
|
#undef TOML_EMPTY_BASES
|
|
|
|
#undef TOML_ENABLE_IF
|
|
|
|
#undef TOML_ENABLE_WARNINGS
|
|
|
|
#undef TOML_EVAL_BOOL_0
|
|
|
|
#undef TOML_EVAL_BOOL_1
|
2021-10-27 16:48:45 +00:00
|
|
|
#undef TOML_EXTERN
|
2021-10-26 18:03:56 +00:00
|
|
|
#undef TOML_EXTERN_NOEXCEPT
|
2021-10-27 13:03:05 +00:00
|
|
|
#undef TOML_EXTERNAL_LINKAGE
|
2021-11-07 14:35:31 +00:00
|
|
|
#undef TOML_FLAGS_ENUM
|
2021-10-24 22:04:23 +00:00
|
|
|
#undef TOML_FLOAT_CHARCONV
|
|
|
|
#undef TOML_FLOAT128
|
|
|
|
#undef TOML_FLOAT16
|
|
|
|
#undef TOML_FP16
|
|
|
|
#undef TOML_GCC
|
|
|
|
#undef TOML_HAS_ATTR
|
|
|
|
#undef TOML_HAS_CHAR8
|
|
|
|
#undef TOML_HAS_CUSTOM_OPTIONAL_TYPE
|
|
|
|
#undef TOML_HAS_INCLUDE
|
2021-11-04 22:43:42 +00:00
|
|
|
#undef TOML_HAS_SSE2
|
|
|
|
#undef TOML_HAS_SSE4_1
|
2021-11-02 20:13:09 +00:00
|
|
|
#undef TOML_HIDDEN_CONSTRAINT
|
2021-10-24 22:04:23 +00:00
|
|
|
#undef TOML_ICC
|
|
|
|
#undef TOML_ICC_CL
|
|
|
|
#undef TOML_IMPL_NAMESPACE_END
|
|
|
|
#undef TOML_IMPL_NAMESPACE_START
|
|
|
|
#undef TOML_IMPLEMENTATION
|
|
|
|
#undef TOML_INCLUDE_WINDOWS_H
|
|
|
|
#undef TOML_INT_CHARCONV
|
|
|
|
#undef TOML_INT128
|
|
|
|
#undef TOML_INTELLISENSE
|
|
|
|
#undef TOML_INTERNAL_LINKAGE
|
|
|
|
#undef TOML_LANG_AT_LEAST
|
|
|
|
#undef TOML_LANG_EFFECTIVE_VERSION
|
|
|
|
#undef TOML_LANG_HIGHER_THAN
|
|
|
|
#undef TOML_LANG_UNRELEASED
|
|
|
|
#undef TOML_LAUNDER
|
|
|
|
#undef TOML_LIFETIME_HOOKS
|
|
|
|
#undef TOML_LIKELY
|
2022-01-06 11:26:01 +00:00
|
|
|
#undef TOML_LIKELY_CASE
|
2021-10-24 22:04:23 +00:00
|
|
|
#undef TOML_MAKE_FLAGS
|
|
|
|
#undef TOML_MAKE_FLAGS_
|
|
|
|
#undef TOML_MAKE_VERSION
|
|
|
|
#undef TOML_MSVC
|
|
|
|
#undef TOML_NAMESPACE
|
|
|
|
#undef TOML_NEVER_INLINE
|
|
|
|
#undef TOML_NODISCARD
|
|
|
|
#undef TOML_NODISCARD_CTOR
|
2021-11-07 14:35:31 +00:00
|
|
|
#undef TOML_OPEN_ENUM
|
|
|
|
#undef TOML_OPEN_FLAGS_ENUM
|
2021-10-24 22:04:23 +00:00
|
|
|
#undef TOML_PARSER_TYPENAME
|
|
|
|
#undef TOML_POP_WARNINGS
|
2021-10-27 13:03:05 +00:00
|
|
|
#undef TOML_PURE_GETTER
|
|
|
|
#undef TOML_PURE_INLINE_GETTER
|
2021-10-24 22:04:23 +00:00
|
|
|
#undef TOML_PUSH_WARNINGS
|
|
|
|
#undef TOML_REQUIRES
|
|
|
|
#undef TOML_SA_LIST_BEG
|
|
|
|
#undef TOML_SA_LIST_END
|
|
|
|
#undef TOML_SA_LIST_NEW
|
|
|
|
#undef TOML_SA_LIST_NXT
|
|
|
|
#undef TOML_SA_LIST_SEP
|
|
|
|
#undef TOML_SA_NATIVE_VALUE_TYPE_LIST
|
|
|
|
#undef TOML_SA_NEWLINE
|
|
|
|
#undef TOML_SA_NODE_TYPE_LIST
|
|
|
|
#undef TOML_SA_UNWRAPPED_NODE_TYPE_LIST
|
|
|
|
#undef TOML_SA_VALUE_EXACT_FUNC_MESSAGE
|
|
|
|
#undef TOML_SA_VALUE_FUNC_MESSAGE
|
|
|
|
#undef TOML_SA_VALUE_MESSAGE_CONST_CHAR8
|
|
|
|
#undef TOML_SA_VALUE_MESSAGE_U8STRING_VIEW
|
|
|
|
#undef TOML_SA_VALUE_MESSAGE_WSTRING
|
|
|
|
#undef TOML_SIMPLE_STATIC_ASSERT_MESSAGES
|
|
|
|
#undef TOML_TRIVIAL_ABI
|
|
|
|
#undef TOML_UINT128
|
|
|
|
#undef TOML_UNLIKELY
|
2022-01-06 11:26:01 +00:00
|
|
|
#undef TOML_UNLIKELY_CASE
|
2021-10-24 22:04:23 +00:00
|
|
|
#undef TOML_UNREACHABLE
|
2021-11-14 17:24:19 +00:00
|
|
|
#undef TOML_UNUSED
|
2020-01-04 14:21:38 +00:00
|
|
|
#endif
|
2020-02-18 21:29:59 +00:00
|
|
|
|
2021-10-24 22:04:23 +00:00
|
|
|
#endif // TOMLPLUSPLUS_H
|