Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Struct template greater

boost::pfr::greater — std::greater like comparator that returns boost::pfr::gt (x, y)

Synopsis

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

template<typename T = void> 
struct greater {
  // 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

greater public member functions

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

    Returns:

    true if field of x greater than the field with same index of y and all previous fields of x equal to the same fields 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