PropertyTree compatibility with Visual C++
Hi,
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
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
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_ptreestd::string,std::string ] and [ _Elem=char, _Traits=std::char_traits<char>, _Ax=std::allocator<char>, _Ty1=const std::string, _Ty2=boost::property_tree::basic_ptreestd::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
Le 25/05/2010 17:04, Steven Watanabe a écrit :
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.
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
Thanks for your help, -- Warren Seine
On Tue, 25 May 2010 16:45:51 +0200, Warren Seine
[..]\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>::* '
Can someone reproduce the bug? If so, is there some kind of workaround, even if it requires hacking the library?
This is due to a bug in Microsoft's standard library and has been worked around on trunk and the current release branch. So you can either grab an updated copy of PTree from there (it should seamlessly integrate with older Boost releases) or wait for the next release. Sebastian
participants (3)
-
Sebastian Redl
-
Steven Watanabe
-
Warren Seine