## Class filter

boost::log::filter

## Synopsis

    // In header: <boost/log/expressions/filter.hpp>

    class filter {
    public:
      // types
      typedef bool result_type;  // Result type.

      // member classes/structs/unions

      // Default filter, always returns true.

      struct default_filter {
        // types
        typedef bool result_type;

        // public member functions
        result_type operator()(attribute_value_set const &) const;
      };

      // construct/copy/destruct
      filter();
      filter(filter const &);
      filter(filter &&) noexcept;
      template<typename FunT> filter(FunT &&);
      filter & operator=(filter &&) noexcept;
      filter & operator=(filter const &);
      template<typename FunT> filter & operator=(FunT const &);

      // public member functions
      result_type operator()(attribute_value_set const &) const;
      void reset();
      void swap(filter &) noexcept;
    };

## Description

Log record filter function wrapper.

### `filter` public construct/copy/destruct

1.     filter();

   Default constructor. Creates a filter that always returns `true`.

2.     filter(filter const & that);

   Copy constructor

3.     filter(filter && that) noexcept;

   Move constructor. The moved-from filter is left in an unspecified state.

4.     template<typename FunT> filter(FunT && fun);

   Initializing constructor. Creates a filter which will invoke the specified function object.

5.     filter & operator=(filter && that) noexcept;

   Move assignment. The moved-from filter is left in an unspecified state.

6.     filter & operator=(filter const & that);

   Copy assignment.

7.     template<typename FunT> filter & operator=(FunT const & fun);

   Initializing assignment. Sets the specified function object to the filter.

### `filter` public member functions

1.     result_type operator()(attribute_value_set const & values) const;

   Filtering operator.

   Parameters:

   `values` | Attribute values of the log record.

   Returns: | `true` if the log record passes the filter, `false` otherwise.

2.     void reset();

   Resets the filter to the default. The default filter always returns `true`.

3.     void swap(filter & that) noexcept;

   Swaps two filters