--- trunk/OOPSE-4/src/utils/Algorithm.hpp 2005/04/15 22:03:16 2203 +++ trunk/OOPSE-4/src/utils/Algorithm.hpp 2005/04/15 22:04:00 2204 @@ -43,28 +43,28 @@ namespace oopse { namespace oopse { -/** - * copy_if is one of the missing functions in STL. - * copy_if copies elements from the range [first, last) to the range [result, result + (last-first)), - * except that any element for which pred is false is not copied. - */ -template -OutputIterator copy_if(InputIterator first, InputIterator last, OutputIterator result, Predicate p) { + /** + * copy_if is one of the missing functions in STL. + * copy_if copies elements from the range [first, last) to the range [result, result + (last-first)), + * except that any element for which pred is false is not copied. + */ + template + OutputIterator copy_if(InputIterator first, InputIterator last, OutputIterator result, Predicate p) { while (first != last) { - if (p(*first)) { - *result++ = *first; - } - ++first; + if (p(*first)) { + *result++ = *first; + } + ++first; } return result; -} + } -template -struct logical_xor :public std::binary_function { + template + struct logical_xor :public std::binary_function { double operator()(T x, T y) { return x ^ y; } -}; + }; }