2626#include < boost/config.hpp>
2727#include < boost/range/begin.hpp>
2828#include < boost/range/end.hpp>
29- #include < boost/mpl/identity .hpp> // for identity
30- #include < boost/utility/enable_if.hpp> // for boost::disable_if
29+ #include < boost/type_traits/type_identity .hpp> // for boost::type_identity
30+ #include < boost/utility/enable_if.hpp> // for boost::disable_if
3131
3232namespace boost { namespace algorithm {
3333
3434// / \fn clamp ( T const& val,
35- // / typename boost::mpl::identity <T>::type const & lo,
36- // / typename boost::mpl::identity <T>::type const & hi, Pred p )
35+ // / typename boost::type_identity <T>::type const & lo,
36+ // / typename boost::type_identity <T>::type const & hi, Pred p )
3737// / \return the value "val" brought into the range [ lo, hi ]
3838// / using the comparison predicate p.
3939// / If p ( val, lo ) return lo.
@@ -48,17 +48,17 @@ namespace boost { namespace algorithm {
4848// /
4949 template <typename T, typename Pred>
5050 BOOST_CXX14_CONSTEXPR T const & clamp ( T const & val,
51- typename boost::mpl::identity <T>::type const & lo,
52- typename boost::mpl::identity <T>::type const & hi, Pred p )
51+ typename boost::type_identity <T>::type const & lo,
52+ typename boost::type_identity <T>::type const & hi, Pred p )
5353 {
5454// assert ( !p ( hi, lo )); // Can't assert p ( lo, hi ) b/c they might be equal
5555 return p ( val, lo ) ? lo : p ( hi, val ) ? hi : val;
5656 }
5757
5858
5959// / \fn clamp ( T const& val,
60- // / typename boost::mpl:: identity<T>::type const & lo,
61- // / typename boost::mpl:: identity<T>::type const & hi )
60+ // / typename boost::identity<T>::type const & lo,
61+ // / typename boost::identity<T>::type const & hi )
6262// / \return the value "val" brought into the range [ lo, hi ].
6363// / If the value is less than lo, return lo.
6464// / If the value is greater than "hi", return hi.
@@ -70,8 +70,8 @@ namespace boost { namespace algorithm {
7070// /
7171 template <typename T>
7272 BOOST_CXX14_CONSTEXPR T const & clamp ( const T& val,
73- typename boost::mpl::identity <T>::type const & lo,
74- typename boost::mpl::identity <T>::type const & hi )
73+ typename boost::type_identity <T>::type const & lo,
74+ typename boost::type_identity <T>::type const & hi )
7575 {
7676 return boost::algorithm::clamp ( val, lo, hi, std::less<T>());
7777 }
0 commit comments