#4092 closed Bugs (fixed)
VC2010 compile error
Reported by: | Owned by: | Sebastian Redl | |
---|---|---|---|
Milestone: | Boost 1.43.0 | Component: | property_tree |
Version: | Boost 1.42.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Compiling with the RTM Visual Studio 2010 Professional I get the following compile error.
Compile command: ./bjam --build-dir="D:/boostbuild" toolset=msvc --build-type=complete stage
compile-c-c++ D:\boostbuild\boost\bin.v2\libs\graph\build\msvc-10.0\release\link-static\runtime-link-static\graphml.obj graphml.cpp .\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> ] Standard conversion from pointer-to-member of base to pointer-to-member of derived is not applied for template arguments .\boost/property_tree/detail/ptree_implementation.hpp(78) : see reference to class template instantiation 'boost::property_tree::basic_ptree<Key,Data>::subs' being compiled with [ Key=std::string, Data=std::string ] .\boost/foreach.hpp(265) : see reference to class template instantiation 'boost::property_tree::basic_ptree<Key,Data>::const_iterator' being compiled with [ Key=std::string, Data=std::string ] libs\graph\src\graphml.cpp(36) : see reference to class template instantiation 'boost::foreach_detail_::auto_any<T>' being compiled with [ T=boost::property_tree::basic_ptree<std::string,std::string>::const_iterator ] call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >nul cl /Zm800 -nologo @"D:\boostbuild\boost\bin.v2\libs\graph\build\msvc-10.0\release\link-static\runtime-link-static\graphml.obj.rsp" ...failed compile-c-c++ D:\boostbuild\boost\bin.v2\libs\graph\build\msvc-10.0\release\link-static\runtime-link-static\graphml.obj... ...skipped <pD:\boostbuild\boost\bin.v2\libs\graph\build\msvc-10.0\release\link-static\runtime-link-static>libboost_graph-vc100-s-1_42.lib for lack of <pD:\boostbuild\boost\bin.v2\libs\graph\build\msvc-10.0\release\link-static\runtime-link-static>graphml.obj... ...skipped <pstage\lib>libboost_graph-vc100-s-1_42.lib for lack of <pD:\boostbuild\boost\bin.v2\libs\graph\build\msvc-10.0\release\link-static\runtime-link-static>libboost_graph-vc100-s-1_42.lib... ...skipped <pstage\lib>libboost_graph-vc100-s.lib for lack of <pstage\lib>libboost_graph-vc100-s-1_42.lib...
Change History (7)
comment:1 by , 13 years ago
Component: | graph → property_tree |
---|---|
Owner: | changed from | to
comment:2 by , 13 years ago
For reference, _MSC_FULL_VER is 160030319 in the release version of VC10.
comment:3 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [61606]) MSVC 10 final did not fix the std::pair bug as I had hoped, so update the workaround.
Fixes bug 4092
comment:5 by , 12 years ago
I am trying to compile boost 1.45 using the recently released Intel Composer XE 2011 for Windows. I am running into the same error. I have changed the check for BOOST_MSVC to include BOOST_INTEL_WIN (line 19 of boost/property_tree/detail/ptree_implementation.hpp) and can compile successfully. Not sure if this is the proper fix, so I hope the author/maintainer can look into this and fix this.
comment:6 by , 12 years ago
This is still present for Intel Compilers in 1.46.1. Should I open a new ticket?
This is bug #3594, which is fixed in Trunk but references the full VC version number rather than just the major version, so it might need updating. Probably better to just check for '10' rather than the full version at this point?
hope no one minds me changing the component to property_tree.