【C++】编译期函数指针唯一化
· 阅读需 6 分钟
不知道起什么名字, 直接看要实现什么吧:
struct Wdf {
template <bool... Bs, typename... Ts>
std::size_t func(db::FieldPair<Ts>...) {
// ...
}
};
如何获取 &Wdf::func<Bs..., Ts...>
?
Tip
此为期望效果, [&Wdf::func<Bs..., Ts...>
] 语法是错误的! 因为 Ts...
无法被指定.