wrong type in valueAverageBaseTemplates
I think this should be declared as Type2:
Type valueOld(pTraits<Type2>::zero);
As Type can be instantiated as label, there might be unintended truncation going on.
I think this should be declared as Type2:
Type valueOld(pTraits<Type2>::zero);
As Type can be instantiated as label, there might be unintended truncation going on.