[Boost-bugs] [Boost C++ Libraries] #10081: Boost.Algorithm: clamp: discrepancy in parameter & return types between code and online documentation

Subject: [Boost-bugs] [Boost C++ Libraries] #10081: Boost.Algorithm: clamp: discrepancy in parameter & return types between code and online documentation
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-05-30 10:01:45


#10081: Boost.Algorithm: clamp: discrepancy in parameter & return types between
code and online documentation
----------------------------------------+---------------------------
 Reporter: Martin Moene <m.j.moene@…> | Owner: matias
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: Documentation
  Version: Boost 1.55.0 | Severity: Problem
 Keywords: |
----------------------------------------+---------------------------
 The online documentation of the clamp algorithm of Boost.Algorithm reads
 [1]:

 {{{#!cpp
 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.
 [[http://www.boost.org/doc/libs/1_55_0/libs/algorithm/doc/html/algorithm/Misc.html#the_boost_algorithm_library.Misc.clamp|clamp
 in the Boost Algorithm Library]].

 [2]
 [[http://www.boost.org/doc/libs/1_55_0/boost/algorithm/clamp.hpp|boost/algorithm/clamp.hpp]]

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10081>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC