|
Boost Users : |
Subject: Re: [Boost-users] PropertyTree compatibility with Visual C++
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-05-25 11:04:20
AMDG
Warren Seine wrote:
> I'm trying to port a C++ application to Microsoft Windows using the
> Visual C++ environment (Express edition, if it matters) and I'm having
> some trouble with Boost.PropertyTree.
>
> The following code works with GCC but fails to compile on Visual C++
> 10.0:
>
>
> #include <boost/property_tree/ptree.hpp>
>
> int main()
> {
> using boost::property_tree::ptree;
> ptree pt;
> return 0;
> }
>
>
> Here is a sample of the output:
>
> [..]\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>::* '
> with
> [
> _Ty1=const std::string,
> _Ty2=boost::property_tree::basic_ptree<std::string,std::string>
> ]
> and
> [
> _Elem=char,
> _Traits=std::char_traits<char>,
> _Ax=std::allocator<char>,
> _Ty1=const std::string,
> _Ty2=boost::property_tree::basic_ptree<std::string,std::string>
> ]
>
> Can someone reproduce the bug? If so, is there some kind of
> workaround, even if it requires hacking the library?
This has been fixed in the trunk.
https://svn.boost.org/trac/boost/changeset/59734
http://svn.boost.org/trac/boost/changeset/61606
In Christ,
Steven Watanabe
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net