boost::property_tree doesn't work under VC++ 2010

Did anyone else tried to compile ptree with VC++2010?

I tried compiling:
http://www.boost.org/doc/libs/1_43_0/libs/property_tree/examples/debug_settings.cpp
and it gave an error:

1>d:\prog\_c\boost\boost_1_43_0\boost\property_tree\detail\ptree_implementation.hpp(30): error C2440: 'specialization' : cannot convert from 'const std::string std::_Pair_base<_Ty1,_Ty2>::* ' to 'const std::basic_string<_Elem,_Traits,_Ax> std::pair<_Ty1,_Ty2>::* '
1>          with
1>          [
1>              _Ty1=const std::string,
1>              _Ty2=boost::property_tree::basic_ptree<std::string,std::string>
1>          ]
1>          and
1>          [
1>              _Elem=char,
1>              _Traits=std::char_traits<char>,
1>              _Ax=std::allocator<char>,
1>              _Ty1=const std::string,
1>              _Ty2=boost::property_tree::basic_ptree<std::string,std::string>
1>          ]
1>          Standard conversion from pointer-to-member of base to pointer-to-member of derived is not applied for template arguments
1>          d:\prog\_c\boost\boost_1_43_0\boost\property_tree\detail\ptree_implementation.hpp(159) : see reference to class template instantiation 'boost::property_tree::basic_ptree<Key,Data>::subs' being compiled
1>          with
1>          [
1>              Key=std::string,
1>              Data=std::string
1>          ]
1>          d:\prog\_c\boost\boost_1_43_0\boost\property_tree\detail\ptree_implementation.hpp(159) : while compiling class template member function 'boost::property_tree::basic_ptree<Key,Data>::basic_ptree(void)'
1>          with
1>          [
1>              Key=std::string,
1>              Data=std::string
1>          ]
1>          c:\users\r0mai\documents\visual studio 2010\projects\teszt\teszt\main2.cpp(33) : see reference to class template instantiation 'boost::property_tree::basic_ptree<Key,Data>' being compiled
1>          with
1>          [
1>              Key=std::string,
1>              Data=std::string
1>          ]

It seems it can't convert
const std::string std::_Pair_base<const std::string, boost::property_tree::basic_ptree<std::string, std::string> >::*
to
const std::string std::pair<std::string, boost::property_tree::basic_ptree<std::string, std::string> >::*

Error wrote:
Standard conversion from pointer-to-member of base to pointer-to-member of derived is not applied for template arguments

Any ideas?

closed account (y8h7M4Gy)
I'm not familiar with boost, but try using a differant compiler, VC++ is kinda wonky lol
As far as I've seen, boost libraries were designed to compile on every popular compilers. boost::ptree was successfully tested on VC++ 8.0, and it's strange that it doesn't compile on a newer version of the same compiler.
Topic archived. No new replies allowed.