mirror of
https://github.com/boostorg/utility.git
synced 2025-05-09 15:04:00 +00:00
removed policies_type from filter_iterator_generator
[SVN r9214]
This commit is contained in:
parent
fda44ca17d
commit
ed3cbfdb8e
@ -1,3 +1,4 @@
|
|||||||
|
Executing ssh-askpass to query the password...
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
@ -62,6 +63,7 @@ class filter_iterator_generator
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef <tt><a href="./iterator_adaptors.htm#iterator_adaptor">iterator_adaptor</a><...></tt> type; // the resulting filter iterator type
|
typedef <tt><a href="./iterator_adaptors.htm#iterator_adaptor">iterator_adaptor</a><...></tt> type; // the resulting filter iterator type
|
||||||
|
typedef ... policies_type; // the policies type for the iterator adaptor
|
||||||
}
|
}
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
@ -79,12 +81,11 @@ int main() {
|
|||||||
int numbers[] = { 0, -1, 4, -3, 5, 8, -2 };
|
int numbers[] = { 0, -1, 4, -3, 5, 8, -2 };
|
||||||
const int N = sizeof(numbers)/sizeof(int);
|
const int N = sizeof(numbers)/sizeof(int);
|
||||||
|
|
||||||
typedef boost::filter_iterator_generator<is_positive_number, int*, int>
|
typedef boost::filter_iterator_generator<is_positive_number, int*, int> Gen;
|
||||||
FilterIter;
|
|
||||||
is_positive_number predicate;
|
is_positive_number predicate;
|
||||||
FilterIter::policies_type policies(predicate, numbers + N);
|
Gen::policies_type policies(predicate, numbers + N);
|
||||||
FilterIter filter_iter_first(numbers, policies);
|
Gen::type filter_iter_first(numbers, policies);
|
||||||
FilterIter filter_iter_last(numbers + N, policies);
|
Gen::type filter_iter_last(numbers + N, policies);
|
||||||
|
|
||||||
std::copy(filter_iter_first, filter_iter_last, std::ostream_iterator<int>(std::cout, " "));
|
std::copy(filter_iter_first, filter_iter_last, std::ostream_iterator<int>(std::cout, " "));
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user