From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15161 invoked by alias); 26 Jul 2002 08:26:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 15138 invoked by uid 71); 26 Jul 2002 08:26:01 -0000 Resent-Date: 26 Jul 2002 08:26:01 -0000 Resent-Message-ID: <20020726082601.15137.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, wolfgang.bangerth@iwr.uni-heidelberg.de Received: (qmail 12024 invoked by uid 61); 26 Jul 2002 08:20:27 -0000 Message-Id: <20020726082027.12023.qmail@sources.redhat.com> Date: Fri, 26 Jul 2002 01:26:00 -0000 From: wolfgang.bangerth@iwr.uni-heidelberg.de Reply-To: wolfgang.bangerth@iwr.uni-heidelberg.de To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/7412: References to references (DR 106) X-SW-Source: 2002-07/txt/msg00701.txt.bz2 List-Id: >Number: 7412 >Category: c++ >Synopsis: References to references (DR 106) >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Fri Jul 26 01:26:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Wolfgang Bangerth >Release: unknown-1.0 >Organization: >Environment: every gcc version up to 2002/07/17 at least >Description: The C++ standard in its wording prohibits reference-to-reference types, but this is subject to DR 106 (unfortunately not yet in "ready" state, so someone may want to suspend this bug report for the time being). Since it is so simple to create situations where this hurts badly (see attached example), I thought I'd file a report for this. Regards Wolfgang Here's the test case: ----------------------------------------- #include void foo (const int &i, const int &j); int main () { std::bind2nd (std::ptr_fun (&foo), 1); }; ----------------------------------------- The error messages are lengthy, but the essence is that you cannot bind reference arguments to functions, even if they are constant, although I think that would be a perfectly reasonable idea if the object you want to bind is largish, or cannot be copied. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: