Message from discussion Template argument deduction fails on EDG - but why?
From: "Rani Sharoni" <rani_shar...@hotmail.com>
Subject: Re: Template argument deduction fails on EDG - but why?
Date: 13 May 2003 00:53:02 -0400
X-Original-Date: Mon, 12 May 2003 22:32:06 +0300
X-Auth: PGPMoose V1.1 PGP comp.lang.c++.moderated
Stefan Slapeta wrote:
> Hi Rani,
> "Rani Sharoni" <rani_shar...@hotmail.com> wrote:
>> The current language doesn't say anything about cv-qualified
>> conversions between pointers/references to array types although it
>> seems to be safe as cv-qualified pointers conversion (can't break
>> the type system).
I was wrong about the conversion. The conversion from T to T cv& (or T
is obviously allowed even when T is of array type.
The DR link that I mentioned isn't relevant. Sorry.
Back to your original question.
I compiled the code also with GCC3.2 and VC7.1. GCC rejected the code
VC accepted it.
> I think that's not really true, especially as there are strict rules
> for type deduction in function template calls. Take a look at
> [22.214.171.124] where it says:
I looked at 14.8.2 (especially 126.96.36.199/3) and I didn't see any
the case (conversion) you presented. Notice that the following actually
works (EDG and GCC):
template<typename T> int test(T const&);
In this case T==int and test<int> is instantiated (per
> There are no DRs on these lines, so I think EDG behaves incorrectly
I'm really not authorized to say that but maybe Daveed Vandevoorde can
us with this issue.
[ Send an empty e-mail to c++-h...@netlab.cs.rpi.edu for info ]
[ about comp.lang.c++.moderated. First time posters: do this! ]