From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13325 invoked by alias); 27 May 2004 09:42:36 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 13255 invoked by uid 48); 27 May 2004 09:42:33 -0000 Date: Thu, 27 May 2004 19:14:00 -0000 Message-ID: <20040527094233.13254.qmail@sourceware.org> From: "nathan at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040527071518.15674.igodard@pacbell.net> References: <20040527071518.15674.igodard@pacbell.net> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/15674] template argument binding differs between member and static fumctions X-Bugzilla-Reason: CC X-SW-Source: 2004-05/txt/msg03193.txt.bz2 List-Id: ------- Additional Comments From nathan at gcc dot gnu dot org 2004-05-27 09:42 ------- This is a partial overload DR fix. John Spicer scripted DR 214 to cover some aspects of it. One thing he didn't fix was the ordering between Foo (T *) and Foo (T (&)[I]). Both deduce for an array, the former because array->pointer decay happens before deduction when the template argument is not a reference. The partial ordering rules do not have that in them, so the two candidates fail to deduce against eachother and hence are unordered. I argue that because array->pointer decay happens at deduction, it should also happen (when one is a ref and the other is not) at partial ordering. That is what I implemented in GCC when going through an early draft of 214, and talking to John (we needed to do something, because the std was broken). Indeed some of my own code required this partial ordering to not be ambiguous. That the member and nonmember case behave differently is a bug in GCC. We need to implement DR214 plus the array->pointer ordering tweak and lobby the core committee. It is useful to gather user input from the field as to why this case should be ordered. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Last reconfirmed|0000-00-00 00:00:00 |2004-05-27 09:42:32 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15674