Boost.Hana  1.5.0
Your standard library for metaprogramming
boost::hana::detail::nested_than< Algorithm > Struct Template Reference


template<typename Algorithm>
struct boost::hana::detail::nested_than< Algorithm >

Provides a .than static constexpr function object.

When creating a binary function object of type Algo whose signature is A x B -> Return, nested_than<Algo> can be used as a base class of Algo. Doing so will provide a static constexpr member called than, which has the following signature:

B -> A -> Return

Note that the function object Algo must be default-constructible, since it will be called as Algo{}(arguments...).

This function object is especially useful because it takes care of avoiding ODR violations caused by the nested static constexpr member.