Opened 7 years ago

Closed 5 years ago

#11471 closed Feature Requests (fixed)

array is a sequence

Reported by: akrzemi1 Owned by: Raffi Enficiaud
Milestone: Boost 1.65.0 Component: test
Version: Boost 1.59.0 Severity: Problem
Keywords: Cc:

Description

According to docs of Boost.Test v3, a C-array is not recognized as a sequence, and cannot be used with sequence-based test assertions. I think it is an unjustified limitation.

Instead of requiring that type T should have member functions .begin(), .size(), use the approach taken by Boost.Foreach, and only require of ranges, that the following expressions are valid:

boost::begin(e), boost::end(e)

There is no need to require size(), one can always compute it from std::distance(begin(e), end(e)).

Change History (3)

comment:1 by Raffi Enficiaud, 6 years ago

Milestone: Boost 1.60.0Boost 1.63.0
Owner: changed from Gennadiy Rozental to Raffi Enficiaud
Status: newassigned

comment:2 by Raffi Enficiaud, 5 years ago

Milestone: Boost 1.63.0Boost 1.65.0

comment:3 by Raffi Enficiaud, 5 years ago

Resolution: fixed
Status: assignedclosed

In master, rev 3ddb0e0d29e8ebfe4ba20921a3d366f7b5b837b2

Note: See TracTickets for help on using tickets.