I am trying to use vector and boost property tree get() method but i am getting compile errors as follows. could you please help me in resolving these errors.
I am trying to get an std::vector<unsigned char> value using ptree (boost property tree) by typecasting as follows.
const std::vector<unsigned char> Result = pti.get<std::vector<unsigned char>>("XmlMsg.MsgDevice.MsgCommand.resultElement");
But I am getting the following errors: Please let me know how to resolve them.
mdi_boost_1_46_1\boost\property_tree\stream_translator.hpp(36) : error C2679: binary '>>' : no operator found which takes a right-hand operand of type 'stlpd_std::vector<_Tp>' (or there is no acceptable conversion)
with
[
_Tp=unsigned char
]
z:\MDI_protocol\mdi\mdi_boost_1_46_1\boost\property_tree\stream_translator.hpp(35) : while compiling class-template member function 'void boost_1_46_1::property_tree::customize_stream<Ch,Traits,E>::extract(stlpd_std::basic_istream<_CharT,_Traits> &,E &)'
with
[
Ch=char,
Traits=stlpd_std::char_traits<char>,
E=stlpd_std::vector<unsigned char>,
_CharT=char,
_Traits=stlpd_std::char_traits<char>
]
==============
_boost_1_46_1\boost\property_tree\stream_translator.hpp(190) : see reference to class template instantiation 'boost_1_46_1::property_tree::customize_stream<Ch,Traits,E>' being compiled
with
[
Ch=char,
Traits=stlpd_std::char_traits<char>,
E=stlpd_std::vector<unsigned char>
]