From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31122 invoked by alias); 9 Feb 2009 15:59:10 -0000 Received: (qmail 31045 invoked by alias); 9 Feb 2009 15:58:55 -0000 Date: Mon, 09 Feb 2009 15:59:00 -0000 Message-ID: <20090209155855.31044.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libstdc++/39136] std::mem_fun_ref fails to accept a member function whose second argument with default value In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "fang at csl dot cornell dot edu" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-02/txt/msg00780.txt.bz2 ------- Comment #3 from fang at csl dot cornell dot edu 2009-02-09 15:58 ------- Subject: Re: std::mem_fun_ref fails to accept a member function whose second argument with default value > ------- Comment #2 from paolo dot carlini at oracle dot com 2009-02-09 09:53 ------- > (In reply to comment #0) >> I'm not sure if this is valid code. However, the standard seems to indicate >> that resize(size_type), is a required member function (or at least interface) >> of std::vector. > > Which standard? To be clear, in the current one, the function is > resize(size_type sz, T c = T()). I'm looking at the current draft, n2798. 23.2.6.2/10-11 [vector.capacity] which lists both forms of resize(). Yes, libstdc++ covers both by using the trailing default argument, but I still can't pass it to mem_fun/mem_fun_ref. Compilation still fails with both -std=c++0x and -std=c++98 with the above test case. (Test case contains a stray line "Test case:" from mis-pasting, my bad.) > Otherwise, the C++0x overloads require concepts (and I think we also have an > open PR about that) Got a PR reference handy? Fang David Fang http://www.csl.cornell.edu/~fang/ http://www.achronix.com/ -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39136