template<bool b = (D_>0), typename std::enable_if<!b>::type* = nullptr>
func(){}
在b为false的时候,才会定义下面的这个函数,用于在某些情况下屏蔽某些模板函数的定义。
主要用于模板循环定义中的终止函数
vecIn.template block<3,3>(0,0)
如果vecIn使用模板定义的变量,如果其中还需要模板,就需要用.template 。比如vecIn是一个Eigen的类型。
<typename... Elements>
模板的继承类中要使用父类的一些成员变量需要使用using Base在子类的声明:
using Base::intRegister_;
using Base::doubleRegister_;
using Base::mUpdates_;
using Base::mPrediction_;