I am using visual code studio to try to run the real-time-hand-tracker.cpp
I have downloaded all of the folders from git and then I tried to build the .exe file with g++ compiler from mingw64. however this failed with a very very long list of errors and attempts to fix - after reading through the messages from the failed build, I think it is having trouble locating the right find_json() function frequently throughout the program.
I will paste the entire message below. Any help would be very much appreciated ! Thanks so much !
In file included from .\realtime-hand-tracker.cpp:26:
.../third_party/json.h: In instantiation of 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<int, 2>; TS = {}]':
.../include/misc_image.h:57:60: required from 'void visit_fields(DCamera&, F) [with F = field_decoder]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = DCamera; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../include/dcam.h:354:93: required from here
.../third_party/json.h:145:144: error: no matching function for call to 'from_json(linalg::vec<int, 2>&, const json::value&)'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };
~~~~~~~~~^~~~~~~~~~~~~~~~
.../third_party/json.h:138:13: note: candidate: 'void from_json(bool&, const json::value&)'
inline void from_json(bool & b, const json::value & val) { b = val.is_true(); }
^~~~~~~~~
.../third_party/json.h:138:13: note: no known conversion for argument 1 from 'linalg::vec<int, 2>' to 'bool&'
.../third_party/json.h:139:13: note: candidate: 'void from_json(std::__cxx11::string&, const json::value&)'
inline void from_json(std::string & s, const json::value & val) { s = val.string(); }
^~~~~~~~~
.../third_party/json.h:139:13: note: no known conversion for argument 1 from 'linalg::vec<int, 2>' to 'std::__cxx11::string&' {aka 'std::__cxx11::basic_string&'}
.../third_party/json.h:140:79: note: candidate: 'template typename std::enable_if<std::is_arithmetic<_Tp>::value, void>::type from_json(T&, const json::value&)'
template typename std::enable_if<std::is_arithmetic::value>::type from_json(T & n,
const json::value & val) { n = val.number(); }
^~~~~~~~~
.../third_party/json.h:140:79: note: template argument deduction/substitution failed:
.../third_party/json.h: In substitution of 'template typename std::enable_if<std::is_arithmetic<_Tp>::value, void>::type from_json(T&, const json::value&) [with T = linalg::vec<int,
2>]':
.../third_party/json.h:145:144: required from 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<int, 2>; TS = {}]'
.../include/misc_image.h:57:60: required from 'void visit_fields(DCamera&, F) [with F = field_decoder]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = DCamera; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../include/dcam.h:354:93: required from here
.../third_party/json.h:140:79: error: no type named 'type' in 'struct std::enable_if<false, void>'
.../third_party/json.h: In instantiation of 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<int, 2>; TS = {}]':
.../include/misc_image.h:57:60: required from 'void visit_fields(DCamera&, F) [with F = field_decoder]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = DCamera; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../include/dcam.h:354:93: required from here
.../third_party/json.h:141:31: note: candidate: 'template<class T, int N> void from_json(T (&)[N], const json::value&)'
template<class T, int N> void from_json(T (& a)[N], const json::value & val) { for(int i=0; i<N; ++i) from_json(a[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:141:31: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: mismatched types 'T [N]' and 'linalg::vec<int, 2>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };
~~~~~~~~~^~~~~~~~~~~~~~~~
.../third_party/json.h:142:34: note: candidate: 'template<class T, long long unsigned int N> void from_json(std::array<_Tp, _Nm>&, const json::value&)'
template<class T, size_t N> void from_json(std::array<T,N> & a, const json::value & val) { for(size_t i=0; i<N; ++i) from_json(a[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:142:34: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<int, 2>' is not derived from 'std::array<_Tp, _Nm>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };
~~~~~~~~~^~~~~~~~~~~~~~~~
.../third_party/json.h:143:24: note: candidate: 'template void from_json(std::vector&, const json::value&)'
template void from_json(std::vector & v, const json::value & val) { v.resize(val.get_array().size()); for(size_t i=0; i<v.size(); ++i) from_json(v[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:143:24: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<int, 2>' is not derived from 'std::vector'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };
~~~~~~~~~^~~~~~~~~~~~~~~~
.../third_party/json.h:144:24: note: candidate: 'template void from_json(std::map<std::__cxx11::basic_string, T>&, const json::value&)'
template void from_json(std::map<std::string, T> & m, const json::value & val) { for (auto &e : val.get_object()) { from_json(m[e.first], e.second); } }
^~~~~~~~~
.../third_party/json.h:144:24: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<int, 2>' is not derived from 'std::map<std::__cxx11::basic_string, T>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };
~~~~~~~~~^~~~~~~~~~~~~~~~
.../third_party/json.h: In instantiation of 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<float, 2>; TS = {}]':
.../include/misc_image.h:57:81: required from 'void visit_fields(DCamera&, F) [with F = field_decoder]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = DCamera; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../include/dcam.h:354:93: required from here
.../third_party/json.h:145:144: error: no matching function for call to 'from_json(linalg::vec<float, 2>&, const json::value&)'
.../third_party/json.h:138:13: note: candidate: 'void from_json(bool&, const json::value&)'
inline void from_json(bool & b, const json::value & val) { b = val.is_true(); }
^~~~~~~~~
.../third_party/json.h:138:13: note: no known conversion for argument 1 from 'linalg::vec<float, 2>' to 'bool&'
.../third_party/json.h:139:13: note: candidate: 'void from_json(std::__cxx11::string&, const json::value&)'
inline void from_json(std::string & s, const json::value & val) { s = val.string(); }
^~~~~~~~~
.../third_party/json.h:139:13: note: no known conversion for argument 1 from 'linalg::vec<float, 2>' to 'std::__cxx11::string&' {aka 'std::__cxx11::basic_string&'}
.../third_party/json.h:140:79: note: candidate: 'template typename std::enable_if<std::is_arithmetic<_Tp>::value, void>::type from_json(T&, const json::value&)'
template typename std::enable_if<std::is_arithmetic::value>::type from_json(T & n,
const json::value & val) { n = val.number(); }
^~~~~~~~~
.../third_party/json.h:140:79: note: template argument deduction/substitution failed:
.../third_party/json.h: In substitution of 'template typename std::enable_if<std::is_arithmetic<_Tp>::value, void>::type from_json(T&, const json::value&) [with T = linalg::vec<float, 2>]':
.../third_party/json.h:145:144: required from 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<float, 2>; TS = {}]'
.../include/misc_image.h:57:81: required from 'void visit_fields(DCamera&, F) [with F = field_decoder]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = DCamera; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../include/dcam.h:354:93: required from here
.../third_party/json.h:140:79: error: no type named 'type' in 'struct std::enable_if<false, void>'
.../third_party/json.h: In instantiation of 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<float, 2>; TS = {}]':
.../include/misc_image.h:57:81: required from 'void visit_fields(DCamera&, F) [with F = field_decoder]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = DCamera; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../include/dcam.h:354:93: required from here
.../third_party/json.h:141:31: note: candidate: 'template<class T, int N> void from_json(T (&)[N], const json::value&)'
template<class T, int N> void from_json(T (& a)[N], const json::value & val) { for(int i=0; i<N; ++i) from_json(a[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:141:31: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: mismatched types 'T [N]' and 'linalg::vec<float, 2>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };
~~~~~~~~~^~~~~~~~~~~~~~~~
.../third_party/json.h:142:34: note: candidate: 'template<class T, long long unsigned int N> void from_json(std::array<_Tp, _Nm>&, const json::value&)'
template<class T, size_t N> void from_json(std::array<T,N> & a, const json::value & val) { for(size_t i=0; i<N; ++i) from_json(a[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:142:34: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<float, 2>' is not derived from 'std::array<_Tp, _Nm>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };
~~~~~~~~~^~~~~~~~~~~~~~~~
.../third_party/json.h:143:24: note: candidate: 'template void from_json(std::vector&, const json::value&)'
template void from_json(std::vector & v, const json::value & val) { v.resize(val.get_array().size()); for(size_t i=0; i<v.size(); ++i) from_json(v[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:143:24: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<float, 2>' is not derived from 'std::vector'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };
~~~~~~~~~^~~~~~~~~~~~~~~~
.../third_party/json.h:144:24: note: candidate: 'template void from_json(std::map<std::__cxx11::basic_string, T>&, const json::value&)'
template void from_json(std::map<std::string, T> & m, const json::value & val) { for (auto &e : val.get_object()) { from_json(m[e.first], e.second); } }
^~~~~~~~~
.../third_party/json.h:144:24: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<float, 2>' is not derived from 'std::map<std::__cxx11::basic_string, T>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };
~~~~~~~~~^~~~~~~~~~~~~~~~
.../third_party/json.h: In instantiation of 'void from_json(std::vector&, const json::value&) [with T = linalg::vec<float, 3>]':
.../third_party/json.h:145:144: required from 'void field_decoder::operator()(const char*, T&, TS ...) [with T = std::vector<linalg::vec<float, 3> >; TS = {}]'
.../include/../third_party/wingmesh.h:975:3: required from 'void visit_fields(WingMesh&, F) [with F = field_decoder]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = WingMesh; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../third_party/json.h:143:157: required from 'void from_json(std::vector&, const json::value&) [with T = WingMesh]'
.../include/physmodel.h:447:48: required from here
.../third_party/json.h:143:157: error: no matching function for call to 'from_json(__gnu_cxx::__alloc_traits<std::allocator<linalg::vec<float, 3> >, linalg::vec<float, 3> >::value_type&, const json::value&)'
template void from_json(std::vector & v, const json::value & val) { v.resize(val.get_array().size()); for(size_t i=0; i<v.size(); ++i) from_json(v[i], val[i]); }
.../third_party/json.h:138:13: note: candidate: 'void from_json(bool&, const json::value&)'
inline void from_json(bool & b, const json::value & val) { b = val.is_true(); }
^~~~~~~~~
.../third_party/json.h:138:13: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<linalg::vec<float, 3> >, linalg::vec<float, 3> >::value_type' {aka 'linalg::vec<float, 3>'} to 'bool&'
.../third_party/json.h:139:13: note: candidate: 'void from_json(std::__cxx11::string&, const json::value&)'
inline void from_json(std::string & s, const json::value & val) { s = val.string(); }
^~~~~~~~~
.../third_party/json.h:139:13: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<linalg::vec<float, 3> >, linalg::vec<float, 3> >::value_type' {aka 'linalg::vec<float, 3>'} to 'std::__cxx11::string&' {aka 'std::__cxx11::basic_string&'}
.../third_party/json.h:140:79: note: candidate: 'template typename std::enable_if<std::is_arithmetic<_Tp>::value, void>::type from_json(T&, const json::value&)'
template typename std::enable_if<std::is_arithmetic::value>::type from_json(T & n,
const json::value & val) { n = val.number(); }
^~~~~~~~~
.../third_party/json.h:140:79: note: template argument deduction/substitution failed:
.../third_party/json.h: In substitution of 'template typename std::enable_if<std::is_arithmetic<_Tp>::value, void>::type from_json(T&, const json::value&) [with T = linalg::vec<float, 3>]':
.../third_party/json.h:143:157: required from 'void from_json(std::vector&, const json::value&) [with T = linalg::vec<float, 3>]'
.../third_party/json.h:145:144: required from 'void field_decoder::operator()(const char*, T&, TS ...) [with T = std::vector<linalg::vec<float, 3> >; TS = {}]'
.../include/../third_party/wingmesh.h:975:3: required from 'void visit_fields(WingMesh&, F) [with F = field_decoder]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = WingMesh; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../third_party/json.h:143:157: required from 'void from_json(std::vector&, const json::value&) [with T = WingMesh]'
.../include/physmodel.h:447:48: required from here
.../third_party/json.h:140:79: error: no type named 'type' in 'struct std::enable_if<false, void>'
.../third_party/json.h: In instantiation of 'void from_json(std::vector&, const json::value&) [with T = linalg::vec<float, 3>]':
.../third_party/json.h:145:144: required from 'void field_decoder::operator()(const char*, T&, TS ...) [with T = std::vector<linalg::vec<float, 3> >; TS = {}]'
.../include/../third_party/wingmesh.h:975:3: required from 'void visit_fields(WingMesh&, F) [with F = field_decoder]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = WingMesh; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../third_party/json.h:143:157: required from 'void from_json(std::vector&, const json::value&) [with T = WingMesh]'
.../include/physmodel.h:447:48: required from here
.../third_party/json.h:141:31: note: candidate: 'template<class T, int N> void from_json(T (&)[N], const json::value&)'
template<class T, int N> void from_json(T (& a)[N], const json::value & val) { for(int i=0; i<N; ++i) from_json(a[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:141:31: note: template argument deduction/substitution failed:
.../third_party/json.h:143:157: note: mismatched types 'T [N]' and '__gnu_cxx::__alloc_traits<std::allocator<linalg::vec<float, 3> >, linalg::vec<float, 3> >::value_type' {aka 'linalg::vec<float, 3>'}
template void from_json(std::vector & v, const json::value & val) { v.resize(val.get_array().size()); for(size_t i=0; i<v.size(); ++i) from_json(v[i], val[i]); }
.../third_party/json.h:142:34: note: candidate: 'template<class T, long long unsigned int N> void from_json(std::array<_Tp, _Nm>&, const json::value&)'
template<class T, size_t N> void from_json(std::array<T,N> & a, const json::value & val) { for(size_t i=0; i<N; ++i) from_json(a[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:142:34: note: template argument deduction/substitution failed:
.../third_party/json.h:143:157: note: '__gnu_cxx::__alloc_traits<std::allocator<linalg::vec<float, 3> >, linalg::vec<float, 3> >::value_type' {aka 'linalg::vec<float, 3>'} is not derived from 'std::array<_Tp, _Nm>'
template void from_json(std::vector & v, const json::value & val) { v.resize(val.get_array().size()); for(size_t i=0; i<v.size(); ++i) from_json(v[i], val[i]); }
.../third_party/json.h:143:24: note: candidate: 'template void from_json(std::vector&, const json::value&)'
template void from_json(std::vector & v, const json::value & val) { v.resize(val.get_array().size()); for(size_t i=0; i<v.size(); ++i) from_json(v[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:143:24: note: template argument deduction/substitution failed:
.../third_party/json.h:143:157: note: '__gnu_cxx::__alloc_traits<std::allocator<linalg::vec<float, 3> >, linalg::vec<float, 3> >::value_type' {aka 'linalg::vec<float, 3>'} is not derived from 'std::vector'
template void from_json(std::vector & v, const json::value & val) { v.resize(val.get_array().size()); for(size_t i=0; i<v.size(); ++i) from_json(v[i], val[i]); }
.../third_party/json.h: In instantiation of 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<float, 3>; TS = {}]':
.../include/physmodel.h:244:76: required from 'void PhysModel::Joint::visit_fields(F) [with F = field_decoder]'
.../third_party/misc.h:110:58: required from 'void visit_fields(T&, F) [with F = field_decoder; T = PhysModel::Joint]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = PhysModel::Joint; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../third_party/json.h:143:157: required from 'void from_json(std::vector&, const json::value&) [with T = PhysModel::Joint]'
.../include/physmodel.h:449:36: required from here
.../third_party/json.h:145:144: error: no matching function for call to 'from_json(linalg::vec<float, 3>&, const json::value&)'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };
~~~~~~~~~^~~~~~~~~~~~~~~~
.../third_party/json.h:138:13: note: candidate: 'void from_json(bool&, const json::value&)'
inline void from_json(bool & b, const json::value & val) { b = val.is_true(); }
^~~~~~~~~
.../third_party/json.h:138:13: note: no known conversion for argument 1 from 'linalg::vec<float, 3>' to 'bool&'
.../third_party/json.h:139:13: note: candidate: 'void from_json(std::__cxx11::string&, const json::value&)'
inline void from_json(std::string & s, const json::value & val) { s = val.string(); }
^~~~~~~~~
.../third_party/json.h:139:13: note: no known conversion for argument 1 from 'linalg::vec<float, 3>' to 'std::__cxx11::string&' {aka 'std::__cxx11::basic_string&'}
.../third_party/json.h:140:79: note: candidate: 'template typename std::enable_if<std::is_arithmetic<_Tp>::value, void>::type from_json(T&, const json::value&)'
template typename std::enable_if<std::is_arithmetic::value>::type from_json(T & n,
const json::value & val) { n = val.number(); }
^~~~~~~~~
.../third_party/json.h:140:79: note: template argument deduction/substitution failed:
.../third_party/json.h: In substitution of 'template typename std::enable_if<std::is_arithmetic<_Tp>::value, void>::type from_json(T&, const json::value&) [with T = linalg::vec<float, 3>]':
.../third_party/json.h:145:144: required from 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<float, 3>; TS = {}]'
.../include/physmodel.h:244:76: required from 'void PhysModel::Joint::visit_fields(F) [with F = field_decoder]'
.../third_party/misc.h:110:58: required from 'void visit_fields(T&, F) [with F = field_decoder; T = PhysModel::Joint]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = PhysModel::Joint; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../third_party/json.h:143:157: required from 'void from_json(std::vector&, const json::value&) [with T = PhysModel::Joint]'
.../include/physmodel.h:449:36: required from here
.../third_party/json.h:140:79: error: no type named 'type' in 'struct std::enable_if<false, void>'
.../third_party/json.h: In instantiation of 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<float, 3>; TS = {}]':
.../include/physmodel.h:244:76: required from 'void PhysModel::Joint::visit_fields(F) [with F = field_decoder]'
.../third_party/misc.h:110:58: required from 'void visit_fields(T&, F) [with F = field_decoder; T = PhysModel::Joint]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = PhysModel::Joint; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../third_party/json.h:143:157: required from 'void from_json(std::vector&, const json::value&) [with T = PhysModel::Joint]'
.../include/physmodel.h:449:36: required from here
.../third_party/json.h:141:31: note: candidate: 'template<class T, int N> void from_json(T (&)[N], const json::value&)'
template<class T, int N> void from_json(T (& a)[N], const json::value & val) { for(int i=0; i<N; ++i) from_json(a[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:141:31: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: mismatched types 'T [N]' and 'linalg::vec<float, 3>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };
~~~~~~~~~^~~~~~~~~~~~~~~~
.../third_party/json.h:142:34: note: candidate: 'template<class T, long long unsigned int N> void from_json(std::array<_Tp, _Nm>&, const json::value&)'
template<class T, size_t N> void from_json(std::array<T,N> & a, const json::value & val) { for(size_t i=0; i<N; ++i) from_json(a[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:142:34: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<float, 3>' is not derived from 'std::array<_Tp, _Nm>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };
~~~~~~~~~^~~~~~~~~~~~~~~~
.../third_party/json.h:143:24: note: candidate: 'template void from_json(std::vector&, const json::value&)'
template void from_json(std::vector & v, const json::value & val) { v.resize(val.get_array().size()); for(size_t i=0; i<v.size(); ++i) from_json(v[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:143:24: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<float, 3>' is not derived from 'std::vector'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };
~~~~~~~~~^~~~~~~~~~~~~~~~
.../third_party/json.h:144:24: note: candidate: 'template void from_json(std::map<std::__cxx11::basic_string, T>&, const json::value&)'
template void from_json(std::map<std::string, T> & m, const json::value & val) { for (auto &e : val.get_object()) { from_json(m[e.first], e.second); } }
^~~~~~~~~
.../third_party/json.h:144:24: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<float, 3>' is not derived from 'std::map<std::__cxx11::basic_string, T>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };
~~~~~~~~~^~~~~~~~~~~~~~~~
.../third_party/json.h: In instantiation of 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<float, 4>; TS = {}]':
.../include/physmodel.h:244:140: required from 'void PhysModel::Joint::visit_fields(F) [with
F = field_decoder]'
.../third_party/misc.h:110:58: required from 'void visit_fields(T&, F) [with F = field_decoder; T = PhysModel::Joint]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = PhysModel::Joint; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../third_party/json.h:143:157: required from 'void from_json(std::vector&, const json::value&) [with T = PhysModel::Joint]'
.../include/physmodel.h:449:36: required from here
.../third_party/json.h:145:144: error: no matching function for call to 'from_json(linalg::vec<float, 4>&, const json::value&)'
.../third_party/json.h:138:13: note: candidate: 'void from_json(bool&, const json::value&)'
inline void from_json(bool & b, const json::value & val) { b = val.is_true(); }
^~~~~~~~~
.../third_party/json.h:138:13: note: no known conversion for argument 1 from 'linalg::vec<float, 4>' to 'bool&'
.../third_party/json.h:139:13: note: candidate: 'void from_json(std::__cxx11::string&, const json::value&)'
inline void from_json(std::string & s, const json::value & val) { s = val.string(); }
^~~~~~~~~
.../third_party/json.h:139:13: note: no known conversion for argument 1 from 'linalg::vec<float, 4>' to 'std::__cxx11::string&' {aka 'std::__cxx11::basic_string&'}
.../third_party/json.h:140:79: note: candidate: 'template typename std::enable_if<std::is_arithmetic<_Tp>::value, void>::type from_json(T&, const json::value&)'
template typename std::enable_if<std::is_arithmetic::value>::type from_json(T & n,
const json::value & val) { n = val.number(); }
^~~~~~~~~
.../third_party/json.h:140:79: note: template argument deduction/substitution failed:
.../third_party/json.h: In substitution of 'template typename std::enable_if<std::is_arithmetic<_Tp>::value, void>::type from_json(T&, const json::value&) [with T = linalg::vec<float, 4>]':
.../third_party/json.h:145:144: required from 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<float, 4>; TS = {}]'
.../include/physmodel.h:244:140: required from 'void PhysModel::Joint::visit_fields(F) [with
F = field_decoder]'
.../third_party/misc.h:110:58: required from 'void visit_fields(T&, F) [with F = field_decoder; T = PhysModel::Joint]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = PhysModel::Joint; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../third_party/json.h:143:157: required from 'void from_json(std::vector&, const json::value&) [with T = PhysModel::Joint]'
.../include/physmodel.h:449:36: required from here
.../third_party/json.h:140:79: error: no type named 'type' in 'struct std::enable_if<false, void>'
.../third_party/json.h: In instantiation of 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<float, 4>; TS = {}]':
.../include/physmodel.h:244:140: required from 'void PhysModel::Joint::visit_fields(F) [with
F = field_decoder]'
.../third_party/misc.h:110:58: required from 'void visit_fields(T&, F) [with F = field_decoder; T = PhysModel::Joint]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = PhysModel::Joint; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../third_party/json.h:143:157: required from 'void from_json(std::vector&, const json::value&) [with T = PhysModel::Joint]'
.../include/physmodel.h:449:36: required from here
.../third_party/json.h:141:31: note: candidate: 'template<class T, int N> void from_json(T (&)[N], const json::value&)'
template<class T, int N> void from_json(T (& a)[N], const json::value & val) { for(int i=0; i<N; ++i) from_json(a[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:141:31: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: mismatched types 'T [N]' and 'linalg::vec<float, 4>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };
~~~~~~~~~^~~~~~~~~~~~~~~~
.../third_party/json.h:142:34: note: candidate: 'template<class T, long long unsigned int N> void from_json(std::array<_Tp, _Nm>&, const json::value&)'
template<class T, size_t N> void from_json(std::array<T,N> & a, const json::value & val) { for(size_t i=0; i<N; ++i) from_json(a[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:142:34: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<float, 4>' is not derived from 'std::array<_Tp, _Nm>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };
~~~~~~~~~^~~~~~~~~~~~~~~~
.../third_party/json.h:143:24: note: candidate: 'template void from_json(std::vector&, const json::value&)'
template void from_json(std::vector & v, const json::value & val) { v.resize(val.get_array().size()); for(size_t i=0; i<v.size(); ++i) from_json(v[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:143:24: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<float, 4>' is not derived from 'std::vector'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };
~~~~~~~~~^~~~~~~~~~~~~~~~
.../third_party/json.h:144:24: note: candidate: 'template void from_json(std::map<std::__cxx11::basic_string, T>&, const json::value&)'
template void from_json(std::map<std::string, T> & m, const json::value & val) { for (auto &e : val.get_object()) {
from_json(m[e.first], e.second); } }
^~~~~~~~~
.../third_party/json.h:144:24: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<float, 4>' is not derived from 'std::map<std::__cxx11::basic_string, T>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field,
TS...) { from_json(field, v[name]); } };