Opened 8 years ago

Closed 8 years ago

#10081 closed Bugs (fixed)

Boost.Algorithm: clamp: discrepancy in parameter & return types between code and online documentation

Reported by: Martin Moene <m.j.moene@…> Owned by: Marshall Clow
Milestone: To Be Determined Component: algorithm
Version: Boost 1.55.0 Severity: Problem
Keywords: Cc:

Description

The online documentation of the clamp algorithm of Boost.Algorithm reads [1]:

template<typename V>
V clamp ( V val, V lo, V hi );

template<typename V, typename Pred>
V clamp ( V val, V lo, V hi, Pred p );

whereas the code [2] passes parameters and return value by const reference. Similarly for the sequence variant.

I'm wondering if this is on purpose or that it is a mistake in the documentation?

[1] Marshall Clow. clamp in the Boost Algorithm Library.

[2] boost/algorithm/clamp.hpp

Change History (2)

comment:1 by Marshall Clow, 8 years ago

Component: Documentationalgorithm
Owner: changed from Matias Capeletto to Marshall Clow
Status: newassigned

It's a mistake in the documentation.

comment:2 by Marshall Clow, 8 years ago

Resolution: fixed
Status: assignedclosed

fixed in [develop 7f7ebc3].

Note: See TracTickets for help on using tickets.