Category: functors | Component type: type |
list<int> L; ... list<int>::iterator in_range = find_if(L.begin(), L.end(), compose2(logical_and<bool>(), bind2nd(greater_equal<int>(), 1), bind2nd(less_equal<int>(), 10))); assert(in_range == L.end() || (*in_range >= 1 && *in_range <= 10));
Parameter | Description | Default |
---|---|---|
T | The type of logical_and's arguments |
Member | Where defined | Description |
---|---|---|
first_argument_type | Adaptable Binary Function | The type of the first argument: T |
second_argument_type | Adaptable Binary Function | The type of the second argument: T |
result_type | Adaptable Binary Function | The type of the result: bool |
bool operator()(const T& x, const T& y) const | Binary Function | Function call operator. The return value is x && y. |
logical_and() | Default Constructible | The default constructor. |
[1] Logical_and and logical_or are not very useful by themselves. They are mainly useful because, when combined with the function object adaptor binary_compose, they perform logical operations on other function objects.
Contact Us | Site Map | Trademarks | Privacy | Using this site means you accept its Terms of Use |
Copyright © 2009 - 2014 Silicon Graphics International. All rights reserved. |