diff options
Diffstat (limited to 'lib/RT.hpp')
-rw-r--r-- | lib/RT.hpp | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -97,40 +97,43 @@ json toJSON(std::map<k,v> &value) { | |||
97 | } | 97 | } |
98 | 98 | ||
99 | template<typename T> | 99 | template<typename T> |
100 | T fromJSON(T &v, json &obj); | 100 | struct W {}; |
101 | |||
102 | template<typename T> | ||
103 | T fromJSON(W<T> w, json &obj); | ||
101 | 104 | ||
102 | template<typename any> | 105 | template<typename any> |
103 | Maybe<any> fromJSON(Maybe<any> &v, json &obj) { | 106 | Maybe<any> fromJSON(W<Maybe<any>> v, json &obj) { |
104 | Maybe<any> a; | 107 | Maybe<any> a; |
105 | return a; | 108 | return a; |
106 | } | 109 | } |
107 | 110 | ||
108 | template<typename any> | 111 | template<typename any> |
109 | V2<any> fromJSON(V2<any> &v, json &obj) { | 112 | V2<any> fromJSON(W<V2<any>> v, json &obj) { |
110 | V2<any> a; | 113 | V2<any> a; |
111 | return a; | 114 | return a; |
112 | } | 115 | } |
113 | 116 | ||
114 | template<typename any> | 117 | template<typename any> |
115 | V3<any> fromJSON(V3<any> &v, json &obj) { | 118 | V3<any> fromJSON(W<V3<any>> v, json &obj) { |
116 | V3<any> a; | 119 | V3<any> a; |
117 | return a; | 120 | return a; |
118 | } | 121 | } |
119 | 122 | ||
120 | template<typename any> | 123 | template<typename any> |
121 | V4<any> fromJSON(V4<any> &v, json &obj) { | 124 | V4<any> fromJSON(W<V4<any>> v, json &obj) { |
122 | V4<any> a; | 125 | V4<any> a; |
123 | return a; | 126 | return a; |
124 | } | 127 | } |
125 | 128 | ||
126 | template<typename any> | 129 | template<typename any> |
127 | std::vector<any> fromJSON(std::vector<any> &v, json &obj) { | 130 | std::vector<any> fromJSON(W<std::vector<any>> v, json &obj) { |
128 | std::vector<any> a; | 131 | std::vector<any> a; |
129 | return a; | 132 | return a; |
130 | } | 133 | } |
131 | 134 | ||
132 | template<typename k, typename v> | 135 | template<typename k, typename v> |
133 | std::map<k,v> fromJSON(std::map<k,v> &value, json &obj) { | 136 | std::map<k,v> fromJSON(W<std::map<k,v>> value, json &obj) { |
134 | std::map<k,v> a; | 137 | std::map<k,v> a; |
135 | return a; | 138 | return a; |
136 | } | 139 | } |