Opened 6 years ago

Closed 6 years ago

#5137 closed Bugs (fixed)

any_range : boost/range/concepts.hpp is missing

Reported by: Akira Takahashi <faithandbrave@…> Owned by: neilgroves
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 6 years ago by Akira Takahashi <faithandbrave@…>

sorry, compile successful in rev.68177.

comment:2 Changed 6 years ago by neilgroves

  • Resolution set to fixed
  • Status changed from new to closed

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain neilgroves.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.