------- Comment #7 from photon at seznam dot cz  2007-10-16 09:23 -------
(In reply to comment #6)
> 
> What are your thoughts about the other issues raised by 325?
> 

The suggested resolution disregards the syntactical needs of templates and
makes 'int Foo (int i = T<1, int>::i);' invalid. The current standard is
inconsistent and should be fixed. For example, the following code is invalid:

class A
{
        void f (T a);
        typedef int T;
};

Yet, this one is not:

class B
{
        void f (int a = (T) 1);
        typedef int T;
};

This inconsistency is unexpected and confusing. Default arguments should be
strictly required to be parsed at the point of appearance. Deferred parsing
brings very little benefit here, yet the price paid for it is high: template
argument separator does not work as expected.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33754

Reply via email to