This is a bug in Comeau 4.3.3 (EDG) and fixed in the latest Comeau
release. Daveed Vandevoorde described it here
which I'm reproducing below for convenience
<<<<<<<<<<, quote Daveede >>>>>>>>>>
OK. Just work your way through 220.127.116.11.
Para 1: Our A is "int" and our P is "T const(&)[S]".
P is a reference type, so skip the 3 bullets.
P is not a cv-qualified type (references never are),
so skip the first sentence after the bullets.
P is a reference type, so we use P' = "T const [S]"
for deduction purposes.
We try to find T, S such that P' becomes identical
to A. That's not possible, so we looks at the
three bullets. The 2nd and 3rd don't apply, but
the first implies that T=int, S=10 is OK because
"int const" is more cv-qualified that "int"
So deduction succeeds.
<<<<<<<<<<<<< end quote >>>>>>>>>>>>.
However the wording in 18.104.22.168 is being tinkered with in active issue
where the word transformed is added (the deduced A can be more CV
qualified than the transformed A), but in this case, A and transformed
A are the same.
Note also issue 214 partial ordering, where references are first
removed, then top level CV qualifiers are removed.
The standard doesn't define what a "top level" CV qualifier is.
Presumably with int const arr; the const is a top level CV
qualifier. In 5.2.8/5, const&D is implied as having a top level CV
qualifier, which suggests to me that 22.214.171.124/2 would benefit from
pointing out that references are never "CV qualified types" as Daveede
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:firstname.lastname@example.org ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.yqcomputer.com/