From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17630 invoked by alias); 9 Apr 2002 07:58:50 -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 17590 invoked by uid 61); 9 Apr 2002 07:58:49 -0000 Date: Tue, 09 Apr 2002 00:58:00 -0000 Message-ID: <20020409075849.17589.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, rkbr@oce.nl From: bkoz@gcc.gnu.org Reply-To: bkoz@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, rkbr@oce.nl, gcc-gnats@gcc.gnu.org Subject: Re: libstdc++/6230: Using not1() from std_function.h causes ICE X-SW-Source: 2002-04/txt/msg00519.txt.bz2 List-Id: Synopsis: Using not1() from std_function.h causes ICE State-Changed-From-To: open->analyzed State-Changed-By: bkoz State-Changed-When: Tue Apr 9 00:58:48 2002 State-Changed-Why: Here's the useful bit: #include #include #include class Foo { public: int myvar; public: Foo (int v) { myvar = v; } class lt { private: int bound; public: lt(const int b) :bound(b) { } bool operator() (const Foo & foo) { return foo.myvar < bound; } }; }; int main (void) { using namespace std; list l; for (int i = 0; i < 100; i++) l.push_back(Foo(i)); remove_if( l.begin(), l.end(), not1( Foo::lt(50) ) ); return 0; } on gcc-3.1-20020409 it gives: 6230.cc: In instantiation of `std::unary_negate': 6230.cc:28: instantiated from here 6230.cc:28: no type named `argument_type' in `class Foo::lt' /mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3/include/bits/stl_function.h:278: no type named `argument_type' in `class Foo::lt' /mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3/include/bits/stl_algo.h: In function `_OutputIter std::remove_copy_if(_InputIter, _InputIter, _OutputIter, _Predicate) [with _InputIter = std::_List_iterator, _OutputIter = std::_List_iterator, _Predicate = std::unary_negate]': /mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3/include/bits/stl_algo.h:1085: instantiated from `_ForwardIter std::remove_if(_ForwardIter, _ForwardIter, _Predicate) [with _ForwardIter = std::_List_iterator, _Predicate = std::unary_negate]' 6230.cc:28: instantiated from here /mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3/include/bits/stl_algo.h:1016: no match for call to `(std::unary_negate) (Foo&)' /mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3/include/bits/stl_algo.h: In function `_InputIter std::find_if(_InputIter, _InputIter, _Predicate, std::input_iterator_tag) [with _InputIter = std::_List_iterator, _Predicate = std::unary_negate]': /mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3/include/bits/stl_algo.h:318: instantiated from `_InputIter std::find_if(_InputIter, _InputIter, _Predicate) [with _InputIter = std::_List_iterator, _Predicate = std::unary_negate]' /mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3/include/bits/stl_algo.h:1083: instantiated from `_ForwardIter std::remove_if(_ForwardIter, _ForwardIter, _Predicate) [with _ForwardIter = std::_List_iterator, _Predicate = std::unary_negate]' 6230.cc:28: instantiated from here /mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3/include/bits/stl_algo.h:188: no match for call to `(std::unary_negate) (Foo&)' http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6230