Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Struct template not_equal

pfr::not_equal — std::not_equal like comparator that returns pfr::ne (x, y)

Synopsis

// In header: <pfr/functors.hpp>

template<typename T = void> 
struct not_equal {
  // types
  typedef std::true_type is_transparent;  // This typedef exists only if T is void. 

  // public member functions
  bool operator()(const T &, const T &) const;
  template<typename V, typename U> bool operator()(const V &, const U &) const;
};

Description

not_equal public member functions

  1. bool operator()(const T & x, const T & y) const;

    Returns:

    true if at least one field x not equals the field with same index of y.

  2. template<typename V, typename U> 
      bool operator()(const V & x, const U & y) const;

    This operator allows comparison of x and y that have different type.

    Requires:

    Exists only if T is void.


PrevUpHomeNext