Opened 8 years ago

Last modified 8 years ago

#10497 new Bugs

Cannot assign filter_range to any_range (gcc only)

Reported by: Alex Puchades <alex94puchades+dev@…> Owned by: Neil Groves
Milestone: To Be Determined Component: range
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc:

Description

When trying to assign a filter_range to a suitable any_range, the attached source code fails to compile under g++ (v4.8.3), but does compile under clang++ (v3.4).

From the error messages I get, it seems that the error triggers when trying to use the default constructor of filter_range with Predicate = lambda and an Iterator = non-default-constructible iterator.

Attachments (1)

bug_any_range.cpp (1.0 KB ) - added by Alex Puchades <alex94puchades+dev@…> 8 years ago.
The offending code (compile with C++11 support)

Download all attachments as: .zip

Change History (2)

by Alex Puchades <alex94puchades+dev@…>, 8 years ago

Attachment: bug_any_range.cpp added

The offending code (compile with C++11 support)

comment:1 by Neil Groves, 8 years ago

The defect is in the test code. A Forward Iterator, as defined by the C++ standard, must be default constructible.

Note: See TracTickets for help on using tickets.