Subject: Re: [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-23 14:14:17
#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
Resolution: | Keywords:
------------------------------------------+------------------------
Comment (by andysem):
This is a known problem caused by #7996. The workaround is to explicitly
specify the fallback policy in case if the attribute value is missing, for
example:
{{{
sink->set_filter(phoenix::bind(&my_filter, severity.or_none(),
tag_attr.or_none()));
}}}
Here or_none means "pass an empty value_ref to my_filter if the attribute
value is not found".
I've updated the docs, thanks for the report.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9291#comment:2> 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