--- trunk/src/utils/Algorithm.hpp 2012/08/22 02:28:28 1782 +++ trunk/src/utils/Algorithm.hpp 2012/10/03 14:07:28 1802 @@ -61,11 +61,17 @@ namespace OpenMD { return result; } - - template struct logical_xor : public std::binary_function { T operator()(const T& x, const T& y) { return x ^ y; } }; - + + template + struct to_bool : public std::unary_function { + bool operator()(const T& x) const { + return x != 0; + } + }; } + +