mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-18 02:08:09 +08:00
feat: do not consider string_view as a container
it is a kind of string.
This commit is contained in:
@@ -7,6 +7,11 @@
|
|||||||
#include "traits.hpp"
|
#include "traits.hpp"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
#if __cplusplus >= 201703L
|
||||||
|
#if __has_include(<string_view>)
|
||||||
|
#include <string_view>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace toml
|
namespace toml
|
||||||
{
|
{
|
||||||
@@ -172,6 +177,9 @@ template<typename T>
|
|||||||
struct is_container : conjunction<
|
struct is_container : conjunction<
|
||||||
negation<is_map<T>>,
|
negation<is_map<T>>,
|
||||||
negation<std::is_same<T, std::string>>,
|
negation<std::is_same<T, std::string>>,
|
||||||
|
#if __cplusplus >= 201703L
|
||||||
|
negation<std::is_same<T, std::string_view>>,
|
||||||
|
#endif
|
||||||
has_iterator<T>,
|
has_iterator<T>,
|
||||||
has_value_type<T>
|
has_value_type<T>
|
||||||
>{};
|
>{};
|
||||||
|
Reference in New Issue
Block a user