[property_tree][log] Error compiling with Visual C++ 2010 Beta 2

Hi all, I'm currently experimenting with Visual C++ 2010 Beta 2. I've found compilation problems related to property_tree and log libraries. Hope it's not a problem to send a single post for two libraries. Boost.PropertyTree: the simplest program: #include "stdafx.h" #include <boost/property_tree/ptree.hpp> int _tmain(int argc, _TCHAR* argv[]) { boost::property_tree::ptree tree; return 0; } generate the error: c:\users\fulvio\sviluppo\boost_1_41_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> c:\users\fulvio\sviluppo\boost_1_41_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> c:\users\fulvio\sviluppo\boost_1_41_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> d:\documenti\visual studio 2010\projects\testpropertytree\testpropertytree\testpropertytree.cpp(9) : 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> ] Boost.Log The compilation with bjam gives the error: libs\log\src\filter_parser.cpp(149) : error C2668: 'std::tr1::bind' : ambiguous call to overloaded function C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\xxbind1(363): could be 'std::tr1::_Bind<_Result_type,_Ret,_BindN> std::tr1::bind<void,const std::basic_string<_Elem,_Traits,_Ax>&,double,boost::function1<R,T0>&,boost::reference_wrapper<T>,boost::arg<I>,boost::reference_wrapper<boost::function1<R,T0>>>(_Rx (__cdecl *const )(_Farg0,_Farg1,_Farg2),_Arg0,_Arg1,_Arg2)' [found using argument-dependent lookup] with [ _Result_type=void, _Ret=void, _BindN=std::tr1::_Bind3<std::tr1::_Callable_fun<void (__cdecl *const )(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &,double,boost::function1<bool,const boost::log_mt_nt5::basic_attribute_values_view<char> &> &),false>,boost::reference_wrapper<const std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,boost::arg<1>,boost::reference_wrapper<boost::function1<bool,const boost::log_mt_nt5::basic_attribute_values_view<char> &>>>, _Elem=char, _Traits=std::char_traits<char>, _Ax=std::allocator<char>, R=bool, T0=const boost::log_mt_nt5::basic_attribute_values_view<char> &, T=const std::basic_string<char,std::char_traits<char>,std::allocator<char>>, I=1, _Rx=void, _Farg0=const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, _Farg1=double, _Farg2=boost::function1<bool,const boost::log_mt_nt5::basic_attribute_values_view<char> &> &, _Arg0=boost::reference_wrapper<const std::basic_string<char,std::char_traits<char>,std::allocator<char>>>, _Arg1=boost::arg<1>, _Arg2=boost::reference_wrapper<boost::function1<bool,const boost::log_mt_nt5::basic_attribute_values_view<char> &>> ] C:\Users\Fulvio\Sviluppo\boost_1_41_0\boost/bind/bind_cc.hpp(46): or 'boost::_bi::bind_t<R,F,L> boost::bind<void,const std::basic_string<_Elem,_Traits,_Ax>&,double,boost::function1<bool,T0>&,boost::reference_wrapper<T>,boost::arg<I>,boost::reference_wrapper<boost::function1<bool,T0>>>(R (__cdecl *)(B1,B2,B3),A1,A2,A3)' with [ R=void, F=void (__cdecl *)(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &,double,boost::function1<bool,const boost::log_mt_nt5::basic_attribute_values_view<char> &> &), L=boost::_bi::list3<boost::reference_wrapper<const std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,boost::arg<1>,boost::reference_wrapper<boost::function1<bool,const boost::log_mt_nt5::basic_attribute_values_view<char> &>>>, _Elem=char, _Traits=std::char_traits<char>, _Ax=std::allocator<char>, T0=const boost::log_mt_nt5::basic_attribute_values_view<char> &, T=const std::basic_string<char,std::char_traits<char>,std::allocator<char>>, I=1, B1=const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, B2=double, B3=boost::function1<bool,const boost::log_mt_nt5::basic_attribute_values_view<char> &> &, A1=boost::reference_wrapper<const std::basic_string<char,std::char_traits<char>,std::allocator<char>>>, A2=boost::arg<1>, A3=boost::reference_wrapper<boost::function1<bool,const boost::log_mt_nt5::basic_attribute_values_view<char> &>> ] while trying to match the argument list '(overloaded-function, const boost::reference_wrapper<T>, boost::arg<I>, const boost::reference_wrapper<T>)' with [ T=const std::basic_string<char,std::char_traits<char>,std::allocator<char>> ] and [ I=1 ] and [ T=boost::function1<bool,const boost::log_mt_nt5::basic_attribute_values_view<char> &> ] libs\log\src\filter_parser.cpp(87) : see reference to function template instantiation 'boost::function1<R,T0> boost::log_mt_nt5::`anonymous-namespace'::default_filter_factory<CharT>::parse_argument<boost::log_mt_nt5::aux::equal_to>(const std::basic_string<_Elem,_Traits,_Ax> &,const std::basic_string<_Elem,_Traits,_Ax> &)' being compiled with [ R=bool, T0=const boost::log_mt_nt5::basic_attribute_values_view<char> &, CharT=char, _Elem=char, _Traits=std::char_traits<char>, _Ax=std::allocator<char> ] libs\log\src\filter_parser.cpp(86) : while compiling class template member function 'boost::function1<R,T0> boost::log_mt_nt5::`anonymous-namespace'::default_filter_factory<CharT>::on_equality_relation(const std::basic_string<_Elem,_Traits,_Ax> &,const std::basic_string<_Elem,_Traits,_Ax> &)' with [ R=bool, T0=const boost::log_mt_nt5::basic_attribute_values_view<char> &, CharT=char, _Elem=char, _Traits=std::char_traits<char>, _Ax=std::allocator<char> ] libs\log\src\filter_parser.cpp(208) : see reference to class template instantiation 'boost::log_mt_nt5::`anonymous-namespace'::default_filter_factory<CharT>' being compiled with [ CharT=char ] libs\log\src\filter_parser.cpp(530) : see reference to class template instantiation 'boost::log_mt_nt5::`anonymous-namespace'::filters_repository<CharT>' being compiled with [ CharT=char ] libs\log\src\filter_parser.cpp(569) : see reference to function template instantiation 'void boost::log_mt_nt5::register_filter_factory<char>(const char *,const boost::shared_ptr<T> &)' being compiled with [ T=boost::log_mt_nt5::filter_factory<char> ] In this case I belive that an explicit namespace qualification could solve. Fulvio Esposito

f.y.i, theres a ticket about the property_tree failure @ https://svn.boost.org/trac/boost/ticket/3594

On 02/02/2010 04:19 PM, Fulvio Esposito wrote:
Hi all, I'm currently experimenting with Visual C++ 2010 Beta 2. I've found compilation problems related to property_tree and log libraries. Hope it's not a problem to send a single post for two libraries.
Boost.Log
The compilation with bjam gives the error:
libs\log\src\filter_parser.cpp(149) : error C2668: 'std::tr1::bind' : ambiguous call to overloaded function
In this case I belive that an explicit namespace qualification could solve.
Fixed in SVN. Thanks!
participants (3)
-
Andrey Semashev
-
Fulvio Esposito
-
Richard Webb