[Boost-bugs] [Boost C++ Libraries] #9291: can not compile sink->set_filter(phoenix::bind(&my_filter, ...

Subject: [Boost-bugs] [Boost C++ Libraries] #9291: can not compile sink->set_filter(phoenix::bind(&my_filter, ...
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-10-22 20:22:20


#9291: can not compile sink->set_filter(phoenix::bind(&my_filter, ...
-----------------------------------------+------------------------
 Reporter: Johan Lundberg <lundberj@…> | Owner: andysem
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: log
  Version: Boost 1.54.0 | Severity: Regression
 Keywords: |
-----------------------------------------+------------------------
 The line

      sink->set_filter(phoenix::bind(&my_filter, severity, tag_attr))

 from the documentation, here:
 http://www.boost.org/doc/libs/1_54_0/libs/log/doc/html/log/tutorial/advanced_filtering.html
 fails to compile.

 *How to reproduce*

 Find this tutorial (linked from the doc above):

 http://www.boost.org/doc/libs/1_54_0/libs/log/example/doc/tutorial_filtering.cpp

 Then change '#if 0' to '#if 1' to activate that part of the tutorial and
 comment out the
 other definition of init(). I get errors related to phoenix bind on line
 155:

     sink->set_filter(phoenix::bind(&my_filter, severity, tag_attr));

 I can't judge if this is a problem with boost log itself or the
 documentation/tutorial.

 I used boost 1.54 and tried gcc 4.7.2 and 4.8.1, and tried both c++11 and
 c++98 mode with the same result.


 * Details on the compilation error: I think this is the relevant
 part of the error message:

 /myboost154/include/boost/phoenix/core/preprocessed/expression_10.hpp:140:17:
 error: could not convert
 â€˜boost::proto::make_expr<boost::phoenix::detail::tag::function_eval,
 boost::proto::domainns_::basic_default_domain,
 boost::phoenix::detail::function_ptr<2, bool, bool (*)(const
 boost::log::v2_mt_posix::value_ref<severity_level>&, const
 boost::log::v2_mt_posix::value_ref<std::basic_string<char> >&)>,
 boost::log::v2_mt_posix::expressions::attribute_keyword<tag::severity>,
 boost::log::v2_mt_posix::expressions::attribute_keyword<tag::tag_attr>
>((* & a0), (* & a1), (* & a2))’
 from
 â€˜const type {aka const
 boost::proto::exprns_::basic_expr<boost::phoenix::detail::tag::function_eval,
 boost::proto::argsns_::list3<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
 boost::proto::argsns_::term<boost::phoenix::detail::function_ptr<2,bool,
 bool (*)(const
 boost::log::v2_mt_posix::value_ref<severity_level>&,
 const boost::log::v2_mt_posix::value_ref<std::basic_string<char>>&)> >,
 0l>,
 boost::log::v2_mt_posix::expressions::attribute_keyword<tag::severity>,
 boost::log::v2_mt_posix::expressions::attribute_keyword<tag::tag_attr> >,
 3l>}’
 to
 â€˜boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
 boost::proto::argsns_::term<boost::phoenix::detail::function_ptr<2,
 bool, bool (*)(const boost::log::v2_mt_posix::value_ref<severity_level>&,
 const boost::log::v2_mt_posix::value_ref<std::basic_string<char> >&)>
>, 0l>::proto_child0 {
 aka
 boost::phoenix::detail::function_ptr<2, bool,
 bool (*)(const boost::log::v2_mt_posix::value_ref<severity_level>&,
 const boost::log::v2_mt_posix::value_ref<std::basic_string<char>
>&)>}’ };

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9291>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC