24 template <
class Predicate_function>
27 const int cutoff = 8096;
60 int main(
int argc,
const char * argv[]) {
65 const long n = 1000000;
68 for (
long i = 1; i <= 2*n; i++)
72 pkeep_if(dst, src, [] (
long x) {
return x%2 == 1; });
75 assert(dst.
size() == n);
84 std::cout <<
"sum = " << sum << std::endl;
void push_front(const value_type &x)
Adds item at the beginning.
void concat(self_type &other)
Merges with content of another container.
void push_back(const value_type &x)
Adds item at the end.
size_type size() const
Returns size.
void pkeep_if(cbdeque &dst, cbdeque &src, const Predicate_function &p)
value_type pop_front()
Deletes first item.
value_type pop_back()
Deletes last item.
int main(int argc, const char *argv[])
bool split(const Pred &p, reference middle_item, self_type &other)
bool empty() const
Test whether the container is empty.
Chunked-sequence functor.