Compile error in std::pair serialization.
Brought to you by:
artyom-beilis
The attached program json_pair.cpp fails to compile with lots of errors, including
/usr/local/include/cppcms/json.h:613:76: error: no matching function for call to 'cppcms::json::value::ge
t_value(const char [6]) const'
std::pair<t1,t2> pair(v.get_value<t1>("first"),v.get_value<t2>("second"));
and
/usr/local/include/cppcms/json.h:619:4: error: no matching function for call to 'cppcms::json::value::set
_value(const char [6], const int&)'
v.set_value("first",in.first);</t2></t1></t1,t2>
It can be fixed changing [g|s]et_value with [g|s]set in cppcms::json::traits< std::pair<T1,T2> >, like in the diff file.
Anonymous