Standard C++ Library Class Reference
logical_not<int>(),1);
This call to replace_if replaces all zeros in the vec1 with "1".
Interface
template <class T>
struct logical_not : unary_function<T, bool> {
typedef typename unary_function<T, bool>::argument_type
argument_type;
typedef typename unary_function<T, bool>::result_type result_type;
bool operator() (const T&) const;
};
Warning
If your compiler does not support default template parameters, you will need to always supply the
Allocator template arguement. For instance, you will have to write :
vector<int, allocator>
instead of :
vector<int>
See Also
Function Objects, unary_function