Opened 9 years ago

Closed 9 years ago

#8649 closed Bugs (invalid)

compilation failure with 1.54.0b1 log

Reported by: Charles Wilson <charles_j_wilson@…> Owned by: Andrey Semashev
Milestone: To Be Determined Component: log
Version: Boost 1.54.0 Severity: Problem
Keywords: windows, vc11, wstring, log Cc:

Description

Using Windows Visual Studio VC11 Nov 2012 CTP in generating for 64-bit, an application using boost.log from 1.54.0b1 with wide strings fails to compile where the source forge revision 854 built and worked properly.

Error message follows:

1>C:\Users\Charles_J_Wilson\Documents\Projects\external\open_source\boost\1.54.0\boost_1_54_0\boost/log/utility/functional/logical.hpp(84): error C2678: binary '==' : no operator found which takes a left-hand operand of type 'const std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>' (or there is no acceptable conversion) 1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\exception(507): could be 'bool std::operator ==(const std::exception_ptr &,const std::exception_ptr &)' [found using argument-dependent lookup] 1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\exception(512): or 'bool std::operator ==(std::nullptr_t,const std::exception_ptr &)' [found using argument-dependent lookup] 1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\exception(517): or 'bool std::operator ==(const std::exception_ptr &,std::nullptr_t)' [found using argument-dependent lookup] 1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\system_error(426): or 'bool std::operator ==(const std::error_code &,const std::error_condition &) throw()' [found using argument-dependent lookup] 1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\system_error(434): or 'bool std::operator ==(const std::error_condition &,const std::error_code &) throw()' [found using argument-dependent lookup] 1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\tuple(572): or 'bool std::operator ==(const std::tuple<std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil> &,const std::tuple<std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil> &)' [found using argument-dependent lookup] 1> while trying to match the argument list '(const std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>, const std::basic_string<char,std::char_traits<char>,std::allocator<char>>)' 1> C:\Users\Charles_J_Wilson\Documents\Projects\external\open_source\boost\1.54.0\boost_1_54_0\boost/log/utility/functional/logical.hpp(77) : see reference to function template instantiation 'bool boost::log::v2_mt_nt5::equal_to::op<T,U>(const T &,const U &,const boost::mpl::false_ &)' being compiled 1> with 1> [ 1> T=std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>> 1> , U=std::basic_string<char,std::char_traits<char>,std::allocator<char>> 1> ] 1> C:\Users\Charles_J_Wilson\Documents\Projects\external\open_source\boost\1.54.0\boost_1_54_0\boost/log/utility/functional/bind.hpp(131) : see reference to function template instantiation 'bool boost::log::v2_mt_nt5::equal_to::operator ()<T,U>(const T &,const U &) const' being compiled 1> with 1> [ 1> T=std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>> 1> , U=std::basic_string<char,std::char_traits<char>,std::allocator<char>> 1> ] 1> C:\Users\Charles_J_Wilson\Documents\Projects\external\open_source\boost\1.54.0\boost_1_54_0\boost/log/utility/value_ref.hpp(230) : see reference to function template instantiation 'bool boost::log::v2_mt_nt5::binder2nd<boost::log::v2_mt_nt5::equal_to,const U &>::operator ()<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>>(const T &) const' being compiled 1> with 1> [ 1> U=std::basic_string<char,std::char_traits<char>,std::allocator<char>> 1> , T=std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>> 1> ] 1> C:\Users\Charles_J_Wilson\Documents\Projects\external\open_source\boost\1.54.0\boost_1_54_0\boost/log/utility/value_ref.hpp(230) : see reference to function template instantiation 'bool boost::log::v2_mt_nt5::binder2nd<boost::log::v2_mt_nt5::equal_to,const U &>::operator ()<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>>(const T &) const' being compiled 1> with 1> [ 1> U=std::basic_string<char,std::char_traits<char>,std::allocator<char>> 1> , T=std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>> 1> ] 1> C:\Users\Charles_J_Wilson\Documents\Projects\external\open_source\boost\1.54.0\boost_1_54_0\boost/log/utility/value_ref.hpp(506) : see reference to function template instantiation 'bool boost::log::v2_mt_nt5::aux::singular_ref<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>,TagT>::apply_visitor_or_default<boost::log::v2_mt_nt5::binder2nd<boost::log::v2_mt_nt5::equal_to,const U &>,bool>(VisitorT,const DefaultT &) const' being compiled 1> with 1> [ 1> TagT=tag::a_tag 1> , U=std::basic_string<char,std::char_traits<char>,std::allocator<char>> 1> , VisitorT=boost::log::v2_mt_nt5::binder2nd<boost::log::v2_mt_nt5::equal_to,const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &> 1> , DefaultT=bool 1> ] 1> C:\Users\Charles_J_Wilson\Documents\Projects\external\open_source\boost\1.54.0\boost_1_54_0\boost/log/utility/value_ref.hpp(506) : see reference to function template instantiation 'bool boost::log::v2_mt_nt5::aux::singular_ref<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>,TagT>::apply_visitor_or_default<boost::log::v2_mt_nt5::binder2nd<boost::log::v2_mt_nt5::equal_to,const U &>,bool>(VisitorT,const DefaultT &) const' being compiled 1> with 1> [ 1> TagT=tag::a_tag 1> , U=std::basic_string<char,std::char_traits<char>,std::allocator<char>> 1> , VisitorT=boost::log::v2_mt_nt5::binder2nd<boost::log::v2_mt_nt5::equal_to,const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &> 1> , DefaultT=bool 1> ] 1> C:\Users\Charles_J_Wilson\Documents\Projects\external\open_source\boost\1.54.0\boost_1_54_0\boost/proto/transform/default.hpp(146) : see reference to function template instantiation 'bool boost::log::v2_mt_nt5::operator ==<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>,TagT,T>(const boost::log::v2_mt_nt5::value_ref<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>,TagT> &,const U &)' being compiled 1> with 1> [ 1> TagT=tag::a_tag 1> , T=std::basic_string<char,std::char_traits<char>,std::allocator<char>> 1> , U=std::basic_string<char,std::char_traits<char>,std::allocator<char>> 1> ] 1> C:\Users\Charles_J_Wilson\Documents\Projects\external\open_source\boost\1.54.0\boost_1_54_0\boost/proto/transform/default.hpp(146) : while compiling class template member function 'bool boost::proto::detail::default_equal_to<Grammar>::impl<Expr &,State,Data>::operator ()(boost::phoenix::actor<boost::proto::exprns_::expr<Tag,Args,2>> ,boost::phoenix::vector2<const boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::logical_and,boost::proto::argsns_::list2<boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::logical_and,boost::proto::argsns_::list2<boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::greater_equal,boost::proto::argsns_::list2<boost::log::v2_mt_nt5::expressions::attribute_actor<ppa_log_levels,boost::log::v2_mt_nt5::fallback_to_none,tag::a_severity,ActorT>,boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<ppa_log_levels>,0>>>,2>>,boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::less_equal,boost::proto::argsns_::list2<boost::log::v2_mt_nt5::expressions::attribute_actor<ppa_log_levels,boost::log::v2_mt_nt5::fallback_to_none,tag::a_severity,ActorT>,boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<ppa_log_levels>,0>>>,2>>>,2>>,boost::phoenix::actor<boost::proto::exprns_::expr<Tag,Args,2>>>,2>> *,A0> ,const boost::phoenix::default_actions &) const' 1> with 1> [ 1> Grammar=boost::phoenix::meta_grammar 1> , Expr=boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::equal_to,boost::proto::argsns_::list2<boost::log::v2_mt_nt5::expressions::attribute_actor<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>,boost::log::v2_mt_nt5::fallback_to_none,tag::a_tag,boost::phoenix::actor>,boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,0>>>,2>> 1> , State=boost::phoenix::vector2<const boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::logical_and,boost::proto::argsns_::list2<boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::logical_and,boost::proto::argsns_::list2<boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::greater_equal,boost::proto::argsns_::list2<boost::log::v2_mt_nt5::expressions::attribute_actor<ppa_log_levels,boost::log::v2_mt_nt5::fallback_to_none,tag::a_severity,boost::phoenix::actor>,boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<ppa_log_levels>,0>>>,2>>,boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::less_equal,boost::proto::argsns_::list2<boost::log::v2_mt_nt5::expressions::attribute_actor<ppa_log_levels,boost::log::v2_mt_nt5::fallback_to_none,tag::a_severity,boost::phoenix::actor>,boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<ppa_log_levels>,0>>>,2>>>,2>>,boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::equal_to,boost::proto::argsns_::list2<boost::log::v2_mt_nt5::expressions::attribute_actor<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>,boost::log::v2_mt_nt5::fallback_to_none,tag::a_tag,boost::phoenix::actor>,boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,0>>>,2>>>,2>> *,const boost::log::v2_mt_nt5::attribute_value_set &> & 1> , Data=const boost::phoenix::default_actions & 1> , Tag=boost::proto::tagns_::tag::equal_to 1> , Args=boost::proto::argsns_::list2<boost::log::v2_mt_nt5::expressions::attribute_actor<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>,boost::log::v2_mt_nt5::fallback_to_none,tag::a_tag,boost::phoenix::actor>,boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,0>>> 1> , ActorT=boost::phoenix::actor 1> , A0=const boost::log::v2_mt_nt5::attribute_value_set & 1> ] 1> C:\Users\Charles_J_Wilson\Documents\Projects\external\open_source\boost\1.54.0\boost_1_54_0\boost/proto/transform/default.hpp(149) : see reference to function template instantiation 'bool boost::proto::detail::default_equal_to<Grammar>::impl<Expr &,State,Data>::operator ()(boost::phoenix::actor<boost::proto::exprns_::expr<Tag,Args,2>> ,boost::phoenix::vector2<const boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::logical_and,boost::proto::argsns_::list2<boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::logical_and,boost::proto::argsns_::list2<boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::greater_equal,boost::proto::argsns_::list2<boost::log::v2_mt_nt5::expressions::attribute_actor<ppa_log_levels,boost::log::v2_mt_nt5::fallback_to_none,tag::a_severity,ActorT>,boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<ppa_log_levels>,0>>>,2>>,boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::less_equal,boost::proto::argsns_::list2<boost::log::v2_mt_nt5::expressions::attribute_actor<ppa_log_levels,boost::log::v2_mt_nt5::fallback_to_none,tag::a_severity,ActorT>,boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<ppa_log_levels>,0>>>,2>>>,2>>,boost::phoenix::actor<boost::proto::exprns_::expr<Tag,Args,2>>>,2>> *,A0> ,const boost::phoenix::default_actions &) const' being compiled 1> with 1> [ 1> Grammar=boost::phoenix::meta_grammar 1> , Expr=boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::equal_to,boost::proto::argsns_::list2<boost::log::v2_mt_nt5::expressions::attribute_actor<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>,boost::log::v2_mt_nt5::fallback_to_none,tag::a_tag,boost::phoenix::actor>,boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,0>>>,2>> 1> , State=boost::phoenix::vector2<const boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::logical_and,boost::proto::argsns_::list2<boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::logical_and,boost::proto::argsns_::list2<boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::greater_equal,boost::proto::argsns_::list2<boost::log::v2_mt_nt5::expressions::attribute_actor<ppa_log_levels,boost::log::v2_mt_nt5::fallback_to_none,tag::a_severity,boost::phoenix::actor>,boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<ppa_log_levels>,0>>>,2>>,boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::less_equal,boost::proto::argsns_::list2<boost::log::v2_mt_nt5::expressions::attribute_actor<ppa_log_levels,boost::log::v2_mt_nt5::fallback_to_none,tag::a_severity,boost::phoenix::actor>,boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<ppa_log_levels>,0>>>,2>>>,2>>,boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::equal_to,boost::proto::argsns_::list2<boost::log::v2_mt_nt5::expressions::attribute_actor<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>,boost::log::v2_mt_nt5::fallback_to_none,tag::a_tag,boost::phoenix::actor>,boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,0>>>,2>>>,2>> *,const boost::log::v2_mt_nt5::attribute_value_set &> & 1> , Data=const boost::phoenix::default_actions & 1> , Tag=boost::proto::tagns_::tag::equal_to 1> , Args=boost::proto::argsns_::list2<boost::log::v2_mt_nt5::expressions::attribute_actor<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>,boost::log::v2_mt_nt5::fallback_to_none,tag::a_tag,boost::phoenix::actor>,boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,0>>> 1> , ActorT=boost::phoenix::actor 1> , A0=const boost::log::v2_mt_nt5::attribute_value_set & 1> ]

Attachments (1)

20130604_boost_1_54_0_log_vc11_compile_fail.zip (93.0 KB ) - added by Charles Wilson <charles_j_wilson@…> 9 years ago.
full compiler failure log (ZIP archive)

Download all attachments as: .zip

Change History (7)

comment:1 by Andrey Semashev, 9 years ago

Please, try again with the version included in the Boost 1.54 beta. If it fails too, then attach the complete build log as an attachment.

comment:2 by Andrey Semashev, 9 years ago

Oh, sorry, I misread the report. You are testing the 1.54 version, right? But anyway, attach the complete log as a file.

by Charles Wilson <charles_j_wilson@…>, 9 years ago

full compiler failure log (ZIP archive)

comment:3 by Charles Wilson <charles_j_wilson@…>, 9 years ago

full compiler log added as requested

comment:4 by Andrey Semashev, 9 years ago

Oddly, the complete log doesn't contain much more context of the error.

Anyway, it seems you're trying to compare an std::string with a std::wstring at some point (probably in some filter, the log doesn't contain the point of your code where that happens). Such comparison will not work, you have to compare strings with matching character types.

comment:5 by Charles Wilson <charles_j_wilson@…>, 9 years ago

After tracing more, the issue revolves around the following macro:

BOOST_LOG_ATTRIBUTE_KEYWORD ( a_tag, "Tag", string )

the failure occurs when the type is specified as wstring.

The macro-ness led to the failure to point to a specific line in the code.

The non-wstring nature of tag is going to plague Windows developers.

comment:6 by Andrey Semashev, 9 years ago

Resolution: invalid
Status: newclosed

The type in this macro is the type of the attribute value. You can use any type there, including wide and narrow strings, as long as you use the correspondingly typed tags. But when changing that type, you have to accordingly change the filters that compare tags with strings.

Note: See TracTickets for help on using tickets.