This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

g++ - pred


Hello again,

Please look at this:

template<class T>
struct Pre
{
   void operator()(const T&, const T&){}
   static void op(const T&, const T&){}
};

template<class T, class PreT=Pre<T> >
void fun(const T& a, const T& b)
{
   PreT::p(a,b);
}

main()
{
   fun(1,2);
   return 0;
}

Why g++-2.95.2 gives me errors telling that I have default arg for template
param
if function template (PreT,fun)? I know that, I wrote it :) ISO/IEC 14882 p.
14.1
says that it should work.

Maciej Hrebien




-- 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]