指向带有模板参数的函数的指针

Pointer to function with template arguments

本文关键字:参数 函数 指针      更新时间:2023-10-16

我如何创建这个,而不创建一个结构?

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

使用using:

template <class T>
using FunctionPointer = bool (*)(T*, T*);
<<p> 生活例子/strong>