You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

232 lines
6.2 KiB

4 months ago
  1. //# This file is a part of toml++ and is subject to the the terms of the MIT license.
  2. //# Copyright (c) Mark Gillard <mark.gillard@outlook.com.au>
  3. //# See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text.
  4. // SPDX-License-Identifier: MIT
  5. #ifndef TOMLPLUSPLUS_HPP
  6. #define TOMLPLUSPLUS_HPP
  7. #define INCLUDE_TOMLPLUSPLUS_H // old guard name used pre-v3
  8. #define TOMLPLUSPLUS_H // guard name used in the legacy toml.h
  9. #include "impl/preprocessor.hpp"
  10. TOML_PUSH_WARNINGS;
  11. TOML_DISABLE_SPAM_WARNINGS;
  12. TOML_DISABLE_SWITCH_WARNINGS;
  13. TOML_DISABLE_SUGGEST_ATTR_WARNINGS;
  14. // misc warning false-positives
  15. #if TOML_MSVC
  16. #pragma warning(disable : 5031) // #pragma warning(pop): likely mismatch
  17. #if TOML_SHARED_LIB
  18. #pragma warning(disable : 4251) // dll exports for std lib types
  19. #endif
  20. #elif TOML_CLANG
  21. TOML_PRAGMA_CLANG(diagnostic ignored "-Wheader-hygiene")
  22. #if TOML_CLANG >= 12
  23. TOML_PRAGMA_CLANG(diagnostic ignored "-Wc++20-extensions")
  24. #endif
  25. #if TOML_CLANG == 13
  26. TOML_PRAGMA_CLANG(diagnostic ignored "-Wreserved-identifier")
  27. #endif
  28. #endif
  29. #include "impl/std_new.hpp"
  30. #include "impl/std_string.hpp"
  31. #include "impl/std_optional.hpp"
  32. #include "impl/forward_declarations.hpp"
  33. #include "impl/print_to_stream.hpp"
  34. #include "impl/source_region.hpp"
  35. #include "impl/date_time.hpp"
  36. #include "impl/at_path.hpp"
  37. #include "impl/path.hpp"
  38. #include "impl/node.hpp"
  39. #include "impl/node_view.hpp"
  40. #include "impl/value.hpp"
  41. #include "impl/make_node.hpp"
  42. #include "impl/array.hpp"
  43. #include "impl/key.hpp"
  44. #include "impl/table.hpp"
  45. #include "impl/unicode_autogenerated.hpp"
  46. #include "impl/unicode.hpp"
  47. #include "impl/parse_error.hpp"
  48. #include "impl/parse_result.hpp"
  49. #include "impl/parser.hpp"
  50. #include "impl/formatter.hpp"
  51. #include "impl/toml_formatter.hpp"
  52. #include "impl/json_formatter.hpp"
  53. #include "impl/yaml_formatter.hpp"
  54. #if TOML_IMPLEMENTATION
  55. #include "impl/std_string.inl"
  56. #include "impl/print_to_stream.inl"
  57. #include "impl/node.inl"
  58. #include "impl/at_path.inl"
  59. #include "impl/path.inl"
  60. #include "impl/array.inl"
  61. #include "impl/table.inl"
  62. #include "impl/unicode.inl"
  63. #include "impl/parser.inl"
  64. #include "impl/formatter.inl"
  65. #include "impl/toml_formatter.inl"
  66. #include "impl/json_formatter.inl"
  67. #include "impl/yaml_formatter.inl"
  68. #endif // TOML_IMPLEMENTATION
  69. TOML_POP_WARNINGS;
  70. // macro hygiene
  71. #if TOML_UNDEF_MACROS
  72. #undef TOML_ABI_NAMESPACE_BOOL
  73. #undef TOML_ABI_NAMESPACE_END
  74. #undef TOML_ABI_NAMESPACE_START
  75. #undef TOML_ABI_NAMESPACES
  76. #undef TOML_ABSTRACT_INTERFACE
  77. #undef TOML_ALWAYS_INLINE
  78. #undef TOML_ANON_NAMESPACE
  79. #undef TOML_ANON_NAMESPACE_END
  80. #undef TOML_ANON_NAMESPACE_START
  81. #undef TOML_ARCH_AMD64
  82. #undef TOML_ARCH_ARM
  83. #undef TOML_ARCH_ARM32
  84. #undef TOML_ARCH_ARM64
  85. #undef TOML_ARCH_BITNESS
  86. #undef TOML_ARCH_ITANIUM
  87. #undef TOML_ARCH_X64
  88. #undef TOML_ARCH_X86
  89. #undef TOML_ASSERT
  90. #undef TOML_ASSERT_ASSUME
  91. #undef TOML_ASSUME
  92. #undef TOML_ASYMMETRICAL_EQUALITY_OPS
  93. #undef TOML_ATTR
  94. #undef TOML_CLANG
  95. #undef TOML_CLANG_VERSION
  96. #undef TOML_CLOSED_ENUM
  97. #undef TOML_CLOSED_FLAGS_ENUM
  98. #undef TOML_COMPILER_HAS_EXCEPTIONS
  99. #undef TOML_COMPILER_HAS_RTTI
  100. #undef TOML_CONST
  101. #undef TOML_CONST_GETTER
  102. #undef TOML_CONST_INLINE_GETTER
  103. #undef TOML_CONSTRAINED_TEMPLATE
  104. #undef TOML_CPP
  105. #undef TOML_DECLSPEC
  106. #undef TOML_DELETE_DEFAULTS
  107. #undef TOML_DISABLE_ARITHMETIC_WARNINGS
  108. #undef TOML_DISABLE_CODE_ANALYSIS_WARNINGS
  109. #undef TOML_DISABLE_SPAM_WARNINGS
  110. #undef TOML_DISABLE_SPAM_WARNINGS_CLANG_10
  111. #undef TOML_DISABLE_SPAM_WARNINGS_CLANG_11
  112. #undef TOML_DISABLE_SUGGEST_ATTR_WARNINGS
  113. #undef TOML_DISABLE_SWITCH_WARNINGS
  114. #undef TOML_DISABLE_WARNINGS
  115. #undef TOML_DOXYGEN
  116. #undef TOML_EMPTY_BASES
  117. #undef TOML_ENABLE_IF
  118. #undef TOML_ENABLE_WARNINGS
  119. #undef TOML_EVAL_BOOL_0
  120. #undef TOML_EVAL_BOOL_1
  121. #undef TOML_EXTERNAL_LINKAGE
  122. #undef TOML_FLAGS_ENUM
  123. #undef TOML_FLOAT_CHARCONV
  124. #undef TOML_FLOAT128
  125. #undef TOML_FLOAT16_DIG
  126. #undef TOML_FLOAT16_LIMITS_SET
  127. #undef TOML_FLOAT16_MANT_DIG
  128. #undef TOML_FLOAT16_MAX_10_EXP
  129. #undef TOML_FLOAT16_MAX_EXP
  130. #undef TOML_FLOAT16_MIN_10_EXP
  131. #undef TOML_FLOAT16_MIN_EXP
  132. #undef TOML_GCC
  133. #undef TOML_GCC_LIKE
  134. #undef TOML_HAS_ATTR
  135. #undef TOML_HAS_BUILTIN
  136. #undef TOML_HAS_CHAR8
  137. #undef TOML_HAS_CPP_ATTR
  138. #undef TOML_HAS_CUSTOM_OPTIONAL_TYPE
  139. #undef TOML_HAS_FEATURE
  140. #undef TOML_HAS_INCLUDE
  141. #undef TOML_HAS_SSE2
  142. #undef TOML_HAS_SSE4_1
  143. #undef TOML_HIDDEN_CONSTRAINT
  144. #undef TOML_ICC
  145. #undef TOML_ICC_CL
  146. #undef TOML_IMPL_NAMESPACE_END
  147. #undef TOML_IMPL_NAMESPACE_START
  148. #undef TOML_IMPLEMENTATION
  149. #undef TOML_INCLUDE_WINDOWS_H
  150. #undef TOML_INLINE_GETTER
  151. #undef TOML_INT_CHARCONV
  152. #undef TOML_INT128
  153. #undef TOML_INTELLISENSE
  154. #undef TOML_INTERNAL_LINKAGE
  155. #undef TOML_LANG_AT_LEAST
  156. #undef TOML_LANG_EFFECTIVE_VERSION
  157. #undef TOML_LANG_HIGHER_THAN
  158. #undef TOML_LANG_UNRELEASED
  159. #undef TOML_LAUNDER
  160. #undef TOML_LIFETIME_HOOKS
  161. #undef TOML_LIKELY
  162. #undef TOML_LIKELY_CASE
  163. #undef TOML_LINUX
  164. #undef TOML_MAKE_FLAGS
  165. #undef TOML_MAKE_FLAGS_
  166. #undef TOML_MAKE_FLAGS_1
  167. #undef TOML_MAKE_FLAGS_2
  168. #undef TOML_MAKE_STRING
  169. #undef TOML_MAKE_STRING_1
  170. #undef TOML_MAKE_VERSION
  171. #undef TOML_MSVC
  172. #undef TOML_MSVC_LIKE
  173. #undef TOML_NAMESPACE
  174. #undef TOML_NEVER_INLINE
  175. #undef TOML_NODISCARD
  176. #undef TOML_NODISCARD_CTOR
  177. #undef TOML_NVCC
  178. #undef TOML_OPEN_ENUM
  179. #undef TOML_OPEN_FLAGS_ENUM
  180. #undef TOML_PARSER_TYPENAME
  181. #undef TOML_POP_WARNINGS
  182. #undef TOML_PRAGMA_CLANG
  183. #undef TOML_PRAGMA_CLANG_GE_10
  184. #undef TOML_PRAGMA_CLANG_GE_11
  185. #undef TOML_PRAGMA_CLANG_GE_8
  186. #undef TOML_PRAGMA_CLANG_GE_9
  187. #undef TOML_PRAGMA_GCC
  188. #undef TOML_PRAGMA_ICC
  189. #undef TOML_PRAGMA_MSVC
  190. #undef TOML_PURE
  191. #undef TOML_PURE_GETTER
  192. #undef TOML_PURE_INLINE_GETTER
  193. #undef TOML_PUSH_WARNINGS
  194. #undef TOML_REQUIRES
  195. #undef TOML_RETURN_BOOL_FROM_FOR_EACH_BROKEN
  196. #undef TOML_RETURN_BOOL_FROM_FOR_EACH_BROKEN_MESSAGE
  197. #undef TOML_SA_LIST_BEG
  198. #undef TOML_SA_LIST_END
  199. #undef TOML_SA_LIST_NEW
  200. #undef TOML_SA_LIST_NXT
  201. #undef TOML_SA_LIST_SEP
  202. #undef TOML_SA_NATIVE_VALUE_TYPE_LIST
  203. #undef TOML_SA_NEWLINE
  204. #undef TOML_SA_NODE_TYPE_LIST
  205. #undef TOML_SA_UNWRAPPED_NODE_TYPE_LIST
  206. #undef TOML_SA_VALUE_EXACT_FUNC_MESSAGE
  207. #undef TOML_SA_VALUE_FUNC_MESSAGE
  208. #undef TOML_SA_VALUE_MESSAGE_CONST_CHAR8
  209. #undef TOML_SA_VALUE_MESSAGE_U8STRING_VIEW
  210. #undef TOML_SA_VALUE_MESSAGE_WSTRING
  211. #undef TOML_SIMPLE_STATIC_ASSERT_MESSAGES
  212. #undef TOML_TRIVIAL_ABI
  213. #undef TOML_UINT128
  214. #undef TOML_UNIX
  215. #undef TOML_UNLIKELY
  216. #undef TOML_UNLIKELY_CASE
  217. #undef TOML_UNREACHABLE
  218. #undef TOML_UNUSED
  219. #undef TOML_WINDOWS
  220. #endif
  221. #endif // TOMLPLUSPLUS_HPP