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

Description

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

Provides a .to static constexpr function object.

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

Object -> Object -> Return

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

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