| Home | Libraries | People | FAQ | More

## Function template is_clamped

boost::algorithm::is_clamped

## Synopsis

    // In header: <boost/algorithm/is_clamped.hpp>

    template<typename T>
      BOOST_CXX14_CONSTEXPR bool
      is_clamped(const T & val,
                 typename boost::type_identity< T >::type const & lo,
                 typename boost::type_identity< T >::type const & hi);

## Description

Parameters:

`hi` | The upper bound of the range
`lo` | The lower bound of the range
`val` | The value to be checked

Returns: | true if value "val" is in the range [ lo, hi ] using operator < for comparison. If the value is less than lo, return false. If the value is greater than hi, return false. Otherwise, returns true.