![]() |
boost::log::filters::flt_attr — The filter checks that the attribute value satisfies the predicate FunT
.
// In header: <boost/log/filters/attr.hpp> template<typename CharT, typename FunT, typename AttributeValueTypesT, typename ExceptionPolicyT> class flt_attr : public basic_filter< CharT, flt_attr< CharT, FunT, AttributeValueTypesT, ExceptionPolicyT > > { public: // types typedef base_type::string_type string_type; // String type. typedef base_type::values_view_type values_view_type; // Attribute values container type. typedef FunT checker_type; // Predicate functor type. // construct/copy/destruct flt_attr(string_type const &, checker_type const &); // public member functions bool operator()(values_view_type const &) const; };
The flt_attr
filter extracts stored attribute value and applies the predicate to it. The result of the predicate is returned as a result of filtering. If the attribute value is not found a missing_attribute_value
exception is thrown.
One should not resort to direct usage of this class. The filter is constructed with the attr
helper function and lambda expression. See "Advanced features ->
Filters -> Generic attribute placeholder" section of the library documentation.