Opened 7 years ago

Closed 7 years ago

#5137 closed Bugs (fixed)

any_range : boost/range/concepts.hpp is missing

Reported by: Akira Takahashi <faithandbrave@…> Owned by: Neil Groves
Milestone: To Be Determined Component: range
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:


#include <boost/range/concepts.hpp>

needs to boost/range/any_range.hpp. tried code:

#include <vector>
#include <boost/assign/list_of.hpp>
//#include <boost/range/concepts.hpp>
#include <boost/range/any_range.hpp> // error! concept is nothing!
#include <boost/range/adaptor/filtered.hpp>
#include <boost/range/algorithm/for_each.hpp>

bool is_even(int x) { return x % 2 == 0; }
void disp(int x) { std::cout << x << std::endl; }

int main()
    const std::vector<int> v = boost::assign::list_of(1)(2)(3)(4)(5);

    boost::any_range<int, boost::forward_traversal_tag, const int&, ptrdiff_t> r = v | boost::adaptors::filtered(is_even);
    boost::for_each(r, disp);

and, any_range template parameter is very many.

Attachments (0)

Change History (2)

comment:1 Changed 7 years ago by Akira Takahashi <faithandbrave@…>

sorry, compile successful in rev.68177.

comment:2 Changed 7 years ago by Neil Groves

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Neil Groves.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.