// This file will create various functors (function object types) for // managing various conditions class Always { public: bool operator() (int x) { return true; } }; class IsPos { public: bool operator() (int x) { return (x > 0); } }; class IsNeg { public: bool operator() (int x) { return (x < 0); } }; class IsEven { public: bool operator() (int x) { return (x % 2 == 0); } }; class IsOdd { public: bool operator() (int x) { return (x % 2 != 0); } }; class IsDivisBy3 { public: bool operator() (int x) { return (x % 3 == 0); } };