使用boost::callable_traits中的has_void_return进行返回类型判定的测试程序
代码示例:
#include <iostream>
#include <boost/callable_traits/has_void_return.hpp>
void foo() {
}
本文演示了一个测试程序,利用boost::callable_traits的has_void_return特性判断函数是否返回void。通过定义foo和bar两个函数,展示了如何在模板代码中使用has_void_return检查返回类型,并输出结果。
使用boost::callable_traits中的has_void_return进行返回类型判定的测试程序
代码示例:
#include <iostream>
#include <boost/callable_traits/has_void_return.hpp>
void foo() {
}

被折叠的 条评论
为什么被折叠?