使用 boost::hana 实现 max 函数的示例程序
boost::hana 是一个用于元编程的 C++ 库,它提供了一组函数式编程工具,可以使 C++ 开发者更方便地进行模板元编程。其中,hana::max 函数是一个求最大值的函数模板。
下面是一个使用 boost::hana 实现 max 函数的示例程序:
#include <boost/hana.hpp>
#include <iostream>
int main()
{
constexpr auto x = boost