Opened 5 years ago

Closed 4 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:


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 Changed 5 years ago by Marshall Clow

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

It's a mistake in the documentation.

comment:2 Changed 4 years ago by Marshall Clow

Resolution: fixed
Status: assignedclosed

fixed in [develop 7f7ebc3].

Note: See TracTickets for help on using tickets.