mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-12-16 03:08:52 +08:00
fix: fix has_from_toml using basic_value
This commit is contained in:
@@ -13,10 +13,14 @@
|
|||||||
#endif // has_include(<string_view>)
|
#endif // has_include(<string_view>)
|
||||||
#endif // cplusplus >= C++17
|
#endif // cplusplus >= C++17
|
||||||
|
|
||||||
|
#include "comments.hpp"
|
||||||
|
#include <vector>
|
||||||
|
#include <unordered_map>
|
||||||
|
|
||||||
namespace toml
|
namespace toml
|
||||||
{
|
{
|
||||||
|
template<typename C, template<typename ...> class T, template<typename ...> class A>
|
||||||
class value; // forward decl
|
class basic_value;
|
||||||
|
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
@@ -58,7 +62,10 @@ struct has_from_toml_method_impl
|
|||||||
{
|
{
|
||||||
template<typename T>
|
template<typename T>
|
||||||
static std::true_type check(
|
static std::true_type check(
|
||||||
decltype(std::declval<T>().from_toml(std::declval<::toml::value>()))*);
|
decltype(std::declval<T>().from_toml(std::declval<::toml::basic_value<
|
||||||
|
::toml::discard_comments, std::unordered_map, std::vector>>()
|
||||||
|
)
|
||||||
|
)*);
|
||||||
template<typename T>
|
template<typename T>
|
||||||
static std::false_type check(...);
|
static std::false_type check(...);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user