template<typename T, template<typename> class CONT = AccumulationTraits >
class Accum
{
public :
statictypename CONT<T>::AccT accum(T const *beg, T const *end)
{
typename CONT<T>::AccT total = CONT<T>::zero();
while(beg != end)
{
total += *beg;
++beg;
}
return total;
}
};
template<typename T, template<typename> class CONT = AccumulationTraits >
inlinetypename CONT<T>::AccT accum(T const *beg, T const *end)
{
return Accum<T, CONT>::accum(beg, end);
}
The code like this work fine on gcc4.5.2
Is this a legal feature of C++0x or a special feature support by gcc?
I can't find any information from the C++0x faq maintain by Bjarne Stroustrup(maybe I missed it)
Thanks a lot