boost::type_erasure模块之callable测试程序
boost::type_erasure是一个强大的C++库,它提供了一种通用的方式来处理不同类型的对象和函数。其中之一的callable概念,允许我们以多态的方式使用任何可调用对象,无论其签名是什么。
下面我们将通过一个测试程序来展示callable的使用方法:
#include <iostream>
#include <boost/type_erasure/any.hpp>
#include
boost::type_erasure模块之callable测试程序
boost::type_erasure是一个强大的C++库,它提供了一种通用的方式来处理不同类型的对象和函数。其中之一的callable概念,允许我们以多态的方式使用任何可调用对象,无论其签名是什么。
下面我们将通过一个测试程序来展示callable的使用方法:
#include <iostream>
#include <boost/type_erasure/any.hpp>
#include