指向函数与模板参数的指针

时间:2014-03-10 21:56:06

标签: c++ function templates pointers c++11

如何在不创建结构的情况下创建它?

template <class T>
typedef bool (* FunctionPointer)(T*, T*);

1 个答案:

答案 0 :(得分:4)

使用using

template <class T>
using FunctionPointer = bool (*)(T*, T*);

Live example

相关问题