Boost logo

Boost :

Subject: [boost] Boost.Logging 1.51 Using VS2012.
From: syvyi (alexander.svk_at_[hidden])
Date: 2013-01-08 17:53:36


Hello,

my application which was successfully compiled on VS2010 brings the next
errors using VS2012

c:\program files
(x86)\boost\boost_1_51_0\boost\log\sources\basic_logger.hpp(227): error
C2664: 'std::pair<_Ty1,_Ty2>
boost::log_mt_nt5::basic_attribute_set<CharT>::insert(const std::pair<const
boost::log_mt_nt5::basic_slim_string<CharT>,boost::log_mt_nt5::basic_attribute_set<CharT>::mapped_type>
)' : cannot convert parameter 1 from 'std::pair<_Ty1,_Ty2>' to 'const
std::pair<_Ty1,_Ty2> &'
4> with
4> [
4>
_Ty1=boost::log_mt_nt5::basic_attribute_set<char>::iter<false>,
4> _Ty2=bool,
4> CharT=char
4> ]
4> and
4> [
4>
_Ty1=std::basic_string<char,std::char_traits&lt;char>,std::allocator<char>>,
4> _Ty2=boost::shared_ptr<boost::log_mt_nt5::attribute>
4> ]
4> and
4> [
4> _Ty1=const boost::log_mt_nt5::basic_slim_string<char>,
4>
_Ty2=boost::log_mt_nt5::basic_attribute_set<char>::mapped_type
4> ]
4> Reason: cannot convert from 'std::pair<_Ty1,_Ty2>' to 'const
std::pair<_Ty1,_Ty2>'
4> with
4> [
4>
_Ty1=std::basic_string<char,std::char_traits&lt;char>,std::allocator<char>>,
4> _Ty2=boost::shared_ptr<boost::log_mt_nt5::attribute>
4> ]
4> and
4> [
4> _Ty1=const boost::log_mt_nt5::basic_slim_string<char>,
4>
_Ty2=boost::log_mt_nt5::basic_attribute_set<char>::mapped_type
4> ]
4> No user-defined-conversion operator available that can perform
this conversion, or the operator cannot be called
4> c:\program files
(x86)\boost\boost_1_51_0\boost\log\sources\basic_logger.hpp(226) : while
compiling class template member function 'std::pair<_Ty1,_Ty2>
boost::log_mt_nt5::sources::basic_logger<CharT,FinalT,ThreadingModelT>::add_attribute_unlocked(const
std::basic_string<_Elem,_Traits,_Alloc> &,const boost::shared_ptr<T> &)'
4> with
4> [
4>
_Ty1=boost::log_mt_nt5::basic_attribute_set<char>::iter<false>,
4> _Ty2=bool,
4> CharT=char,
4> FinalT=manster::logger::manster_logger_mt,
4>
ThreadingModelT=boost::log_mt_nt5::sources::multi_thread_model<boost::log_mt_nt5::aux::light_rw_mutex>,
4> _Elem=char,
4> _Traits=std::char_traits<char>,
4> _Alloc=std::allocator<char>,
4> T=boost::log_mt_nt5::attribute
4> ]
4> c:\program files
(x86)\boost\boost_1_51_0\boost\log\sources\severity_feature.hpp(188) : see
reference to function template instantiation 'std::pair<_Ty1,_Ty2>
boost::log_mt_nt5::sources::basic_logger<CharT,FinalT,ThreadingModelT>::add_attribute_unlocked(const
std::basic_string<_Elem,_Traits,_Alloc> &,const boost::shared_ptr<T> &)'
being compiled
4> with
4> [
4>
_Ty1=boost::log_mt_nt5::basic_attribute_set<char>::iter<false>,
4> _Ty2=bool,
4> CharT=char,
4> FinalT=manster::logger::manster_logger_mt,
4>
ThreadingModelT=boost::log_mt_nt5::sources::multi_thread_model<boost::log_mt_nt5::aux::light_rw_mutex>,
4> _Elem=char,
4> _Traits=std::char_traits<char>,
4> _Alloc=std::allocator<char>,
4> T=boost::log_mt_nt5::attribute
4> ]
4> c:\program files
(x86)\boost\boost_1_51_0\boost\log\sources\channel_feature.hpp(212) : see
reference to class template instantiation
'boost::log_mt_nt5::sources::basic_logger<CharT,FinalT,ThreadingModelT>'
being compiled
4> with
4> [
4> CharT=char,
4> FinalT=manster::logger::manster_logger_mt,
4>
ThreadingModelT=boost::log_mt_nt5::sources::multi_thread_model<boost::log_mt_nt5::aux::light_rw_mutex>
4> ]
4> c:\program files
(x86)\boost\boost_1_51_0\boost\log\sources\basic_logger.hpp(315) : see
reference to class template instantiation
'boost::log_mt_nt5::sources::channel<ChannelT>::apply<BaseT>' being compiled
4> with
4> [
4> ChannelT=std::string,
4>
BaseT=boost::log_mt_nt5::sources::basic_logger<char,manster::logger::manster_logger_mt,boost::log_mt_nt5::sources::multi_thread_model&lt;boost::log_mt_nt5::aux::light_rw_mutex>>
4> ]
4> c:\program files
(x86)\boost\boost_1_51_0\boost\mpl\aux_\preprocessed\plain\apply_wrap.hpp(49)
: see reference to class template instantiation
'boost::log_mt_nt5::sources::aux::inherit_logger_features::apply<PrevT,T>'
being compiled
4> with
4> [
4>
PrevT=boost::log_mt_nt5::sources::basic_logger<char,manster::logger::manster_logger_mt,boost::log_mt_nt5::sources::multi_thread_model&lt;boost::log_mt_nt5::aux::light_rw_mutex>>,
4> T=boost::log_mt_nt5::sources::channel<std::string>
4> ]
4> c:\program files
(x86)\boost\boost_1_51_0\boost\mpl\aux_\preprocessed\plain\apply.hpp(63) :
see reference to class template instantiation
'boost::mpl::apply_wrap2<F,T1,T2>' being compiled
4> with
4> [
4> F=boost::log_mt_nt5::sources::aux::inherit_logger_features,
4>
T1=boost::log_mt_nt5::sources::basic_logger<char,manster::logger::manster_logger_mt,boost::log_mt_nt5::sources::multi_thread_model&lt;boost::log_mt_nt5::aux::light_rw_mutex>>,
4> T2=boost::log_mt_nt5::sources::channel<std::string>
4> ]
4> c:\program files
(x86)\boost\boost_1_51_0\boost\mpl\aux_\preprocessed\plain\reverse_fold_impl.hpp(81)
: see reference to class template instantiation
'boost::mpl::apply2<F,T1,T2>' being compiled
4> with
4> [
4> F=boost::log_mt_nt5::sources::aux::inherit_logger_features,
4>
T1=boost::log_mt_nt5::sources::basic_logger<char,manster::logger::manster_logger_mt,boost::log_mt_nt5::sources::multi_thread_model&lt;boost::log_mt_nt5::aux::light_rw_mutex>>,
4> T2=boost::log_mt_nt5::sources::channel<std::string>
4> ]
4> c:\program files
(x86)\boost\boost_1_51_0\boost\mpl\reverse_fold.hpp(41) : see reference to
class template instantiation
'boost::mpl::aux::reverse_fold_impl<N,First,Last,State,BackwardOp,ForwardOp>'
being compiled
4> with
4> [
4> N=2,
4>
First=boost::mpl::v_iter<boost::mpl::vector2&lt;boost::log_mt_nt5::sources::severity&lt;severity_level>,boost::log_mt_nt5::sources::channel<std::string>>,0>,
4>
Last=boost::mpl::v_iter<boost::mpl::vector2&lt;boost::log_mt_nt5::sources::severity&lt;severity_level>,boost::log_mt_nt5::sources::channel<std::string>>,2>,
4>
State=boost::log_mt_nt5::sources::basic_logger<char,manster::logger::manster_logger_mt,boost::log_mt_nt5::sources::multi_thread_model&lt;boost::log_mt_nt5::aux::light_rw_mutex>>,
4>
BackwardOp=boost::log_mt_nt5::sources::aux::inherit_logger_features,
4> ForwardOp=boost::mpl::arg<1>
4> ]
4> c:\program files
(x86)\boost\boost_1_51_0\boost\log\sources\basic_logger.hpp(338) : see
reference to class template instantiation
'boost::mpl::reverse_fold<Sequence,State,BackwardOp>' being compiled
4> with
4> [
4>
Sequence=boost::log_mt_nt5::sources::features<boost::log_mt_nt5::sources::severity&lt;severity_level>,boost::log_mt_nt5::sources::channel<std::string>>,
4>
State=boost::log_mt_nt5::sources::basic_logger<char,manster::logger::manster_logger_mt,boost::log_mt_nt5::sources::multi_thread_model&lt;boost::log_mt_nt5::aux::light_rw_mutex>>,
4>
BackwardOp=boost::log_mt_nt5::sources::aux::inherit_logger_features
4> ]
4> d:\sankom\manster\manster\manster\manster_logger.h(160) : see
reference to class template instantiation
'boost::log_mt_nt5::sources::basic_composite_logger<CharT,FinalT,ThreadingModelT,FeaturesT>'
being compiled
4> with
4> [
4> CharT=char,
4> FinalT=manster::logger::manster_logger_mt,
4>
ThreadingModelT=boost::log_mt_nt5::sources::multi_thread_model<boost::log_mt_nt5::aux::light_rw_mutex>,
4>
FeaturesT=boost::log_mt_nt5::sources::features<boost::log_mt_nt5::sources::severity&lt;severity_level>,boost::log_mt_nt5::sources::channel<std::string>>
4> ]

What is the solution ?

--
View this message in context: http://boost.2283326.n4.nabble.com/Boost-Logging-1-51-Using-VS2012-tp4641144.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk