@@ -9,13 +9,13 @@ namespace JSON
99{
1010 namespace internal
1111 {
12- template <typename T, bool ClassType, bool Enabler >
12+ template <typename T, bool ClassType, bool Poly >
1313 struct smart_pointer_parser
1414 {
1515 };
1616
1717 template <typename T>
18- struct smart_pointer_parser <T, true , true >
18+ struct smart_pointer_parser <T, true , false >
1919 {
2020 static void get (T& value, std::string const & name, PropertyTree const & object, ParsingOptions const & options)
2121 {
@@ -25,7 +25,7 @@ namespace JSON
2525 };
2626
2727 template <typename T>
28- struct smart_pointer_parser <T, false , true >
28+ struct smart_pointer_parser <T, false , false >
2929 {
3030 static void get (T& value, std::string const & name, PropertyTree const & object, ParsingOptions const & options)
3131 {
@@ -36,7 +36,7 @@ namespace JSON
3636 };
3737
3838 template <typename T>
39- struct smart_pointer_parser <T, true , false >
39+ struct smart_pointer_parser <T, true , true >
4040 {
4141 static void get (T& value, std::string const & name, PropertyTree const & object, ParsingOptions const & options)
4242 {
@@ -73,7 +73,7 @@ namespace JSON
7373 };
7474
7575 template <typename T>
76- struct smart_pointer_parser <T, false , false >
76+ struct smart_pointer_parser <T, false , true >
7777 {
7878 static void get (T& value, std::string const & name, PropertyTree const & object, ParsingOptions const & options)
7979 {
@@ -88,14 +88,13 @@ namespace JSON
8888 {
8989
9090 using element_type = typename std::decay<decltype (value)>::type::element_type;
91- using polydecl_type = polydecls <element_type>;
9291
9392 internal::smart_pointer_parser <T,
9493 std::is_class <element_type>::value,
95- std::is_same < typename polydecl_type::type, no_poly >::value>::get (value,
96- name,
97- object,
98- options);
94+ is_polydecl <element_type >::value>::get (value,
95+ name,
96+ object,
97+ options);
9998 }
10099 }
101100}
0 commit comments