From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Mitchell To: oliva@dcc.unicamp.br Cc: jbuck@synopsys.com, als@tusc.com.au, egcs@cygnus.com Subject: Re: error message formatting Date: Thu, 16 Apr 1998 23:59:00 -0000 Message-id: <199804162313.QAA29122@mail.earthlink.net> References: <199804151709.KAA24258@atrus.synopsys.com> <199804160703.AAA01943@mail.earthlink.net> X-SW-Source: 1998-04/msg00670.html >>>>> "Alexandre" == Alexandre Oliva writes: Alexandre> Mark Mitchell writes: >> We have to be careful that we don't introduce ambiguity in the >> process. It may be possible to do so by dropping defaulted >> arguments, >> template void f(); >> template void f(); Alexandre> `classs T*' is not a valid template argument Alexandre> declaration. Thank you for the improved example. I *knew* when I wrote what I did that I didn't have it right, but I didn't have time to think about it carefully. What an embarrassing mistake! Alexandre> However, the raised issue is a valid one. Suppose one Alexandre> declares: Alexandre> template void f(); template Alexandre> void f(); Alexandre> Then he calls f(). The compiler must report an Alexandre> ambiguity but, if we remove trailing default arguments, Alexandre> the error message would look like: Alexandre> ?:?:Template function call is ambiguous. Available Alexandre> specializations are: ?:?: f() ?:?: f() Alexandre> This would seem rather confusing, although line numbers Alexandre> might help. Alexandre> -- Alexandre Oliva mailto:oliva@dcc.unicamp.br Alexandre> mailto:aoliva@acm.org http://www.dcc.unicamp.br/~oliva Alexandre> Universidade Estadual de Campinas, SP, Brasil -- Mark Mitchell http://home.earthlink.net/~mbmitchell Consulting Services Available