mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-12-16 03:08:52 +08:00
refactor: move HAS_CHAR8_T to version.hpp
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include "../location.hpp"
|
#include "../location.hpp"
|
||||||
#include "../types.hpp"
|
#include "../types.hpp"
|
||||||
#include "../value.hpp"
|
#include "../version.hpp" // IWYU pragma: keep for TOML11_HAS_CHAR8_T
|
||||||
|
|
||||||
namespace toml
|
namespace toml
|
||||||
{
|
{
|
||||||
@@ -21,12 +21,6 @@ inline namespace toml_literals
|
|||||||
|
|
||||||
::toml::value operator"" _toml(const char* str, std::size_t len);
|
::toml::value operator"" _toml(const char* str, std::size_t len);
|
||||||
|
|
||||||
#if defined(__cpp_char8_t)
|
|
||||||
# if __cpp_char8_t >= 201811L
|
|
||||||
# define TOML11_HAS_CHAR8_T 1
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(TOML11_HAS_CHAR8_T)
|
#if defined(TOML11_HAS_CHAR8_T)
|
||||||
// value of u8"" literal has been changed from char to char8_t and char8_t is
|
// value of u8"" literal has been changed from char to char8_t and char8_t is
|
||||||
// NOT compatible to char
|
// NOT compatible to char
|
||||||
|
|||||||
@@ -57,6 +57,11 @@
|
|||||||
#define TOML11_CXX20_VALUE 202002L
|
#define TOML11_CXX20_VALUE 202002L
|
||||||
#endif//TOML11_CXX20_VALUE
|
#endif//TOML11_CXX20_VALUE
|
||||||
|
|
||||||
|
#if defined(__cpp_char8_t)
|
||||||
|
# if __cpp_char8_t >= 201811L
|
||||||
|
# define TOML11_HAS_CHAR8_T 1
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if TOML11_CPLUSPLUS_STANDARD_VERSION >= TOML11_CXX17_VALUE
|
#if TOML11_CPLUSPLUS_STANDARD_VERSION >= TOML11_CXX17_VALUE
|
||||||
# if __has_include(<string_view>)
|
# if __has_include(<string_view>)
|
||||||
|
|||||||
Reference in New Issue
Block a user