mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-12-16 03:08:52 +08:00
[ci skip] use a policy in the CMakeLists.txt for toml11 fix some more string_view errors
This commit is contained in:
@@ -1,9 +1,5 @@
|
|||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.1)
|
||||||
enable_testing()
|
enable_testing()
|
||||||
if("${CMAKE_VERSION}" VERSION_GREATER 3.1)
|
|
||||||
project(toml11 VERSION 3.2.0)
|
|
||||||
else()
|
|
||||||
project(toml11)
|
|
||||||
|
|
||||||
project(toml11 VERSION 3.7.0)
|
project(toml11 VERSION 3.7.0)
|
||||||
|
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ get(basic_value<C, M, V>&& v)
|
|||||||
// ============================================================================
|
// ============================================================================
|
||||||
// std::string_view
|
// std::string_view
|
||||||
|
|
||||||
#if __cplusplus >= 201703L
|
#if defined(TOML11_USING_STRING_VIEW) && TOML11_USING_STRING_VIEW>0
|
||||||
template<typename T, typename C,
|
template<typename T, typename C,
|
||||||
template<typename ...> class M, template<typename ...> class V>
|
template<typename ...> class M, template<typename ...> class V>
|
||||||
inline detail::enable_if_t<std::is_same<T, std::string_view>::value, std::string_view>
|
inline detail::enable_if_t<std::is_same<T, std::string_view>::value, std::string_view>
|
||||||
|
|||||||
@@ -624,7 +624,7 @@ class basic_value
|
|||||||
assigner(this->string_, toml::string(std::string(s), kind));
|
assigner(this->string_, toml::string(std::string(s), kind));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if __cplusplus >= 201703L
|
#if defined(TOML11_USING_STRING_VIEW) && TOML11_USING_STRING_VIEW>0
|
||||||
basic_value(std::string_view s)
|
basic_value(std::string_view s)
|
||||||
: type_(value_t::string),
|
: type_(value_t::string),
|
||||||
region_info_(std::make_shared<region_base>(region_base{}))
|
region_info_(std::make_shared<region_base>(region_base{}))
|
||||||
|
|||||||
Reference in New Issue
Block a user