4. functional — Function objects

This module contains generic function objects. Some of them are inspired by the ones found in the standard library header <functional> while others are slightly different in the way they work.

4.1. Function objects

Just like the standard library, POLDER provides function objects that represent common operators. However, these classes are not templated, only their function call operators are. When possible, they are defined as alias for the equivalent void specialization in the standard library. For example, plus is defined as follows:

using plus = std::plus<>;

POLDER completes this set of function objects with the ones used to represent the missing shift and assignement operators. Here is the full list of function objects provided by POLDER:

class plus
class minus
class multiplies
class divides
class modulus
class negate
class equal_to
class not_equal_to
class greater
class less
class greater_equal
class less_equal
class logical_and
class logical_or
class logical_not
class bit_and
class bit_or
class bit_xor
class bit_not
class left_shift
class right_shift
class assign
class plus_assign
class minus_assign
class multiplies_assign
class divides_assign
class modulus_assign
class bit_and_assign
class bit_or_assign
class bit_xor_assign
class left_shift_assign
class right_shift_assign