public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/2772: bind2nd(mem_fun1_ref) does not work
@ 2001-06-26 17:16 bkoz
  0 siblings, 0 replies; 3+ messages in thread
From: bkoz @ 2001-06-26 17:16 UTC (permalink / raw)
  To: bkoz, eekaikko, gcc-bugs, gcc-prs

Synopsis: bind2nd(mem_fun1_ref) does not work

State-Changed-From-To: feedback->closed
State-Changed-By: bkoz
State-Changed-When: Tue Jun 26 17:16:18 2001
State-Changed-Why:
    Fixed.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2772&database=gcc


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: libstdc++/2772: bind2nd(mem_fun1_ref) does not work
@ 2001-06-11 12:11 bkoz
  0 siblings, 0 replies; 3+ messages in thread
From: bkoz @ 2001-06-11 12:11 UTC (permalink / raw)
  To: bkoz, eekaikko, gcc-bugs, gcc-prs

Synopsis: bind2nd(mem_fun1_ref) does not work

State-Changed-From-To: analyzed->feedback
State-Changed-By: bkoz
State-Changed-When: Mon Jun 11 12:11:22 2001
State-Changed-Why:
    I believe this is fixed with
    
    2001-06-11  Benjamin Kosnik  <bkoz@redhat.com>
    
    	libstdc++/3114
    	* include/bits/ostream.tcc (ostream::seekp): Add error checking as
    	per DR 129.
    	* include/bits/istream.tcc (istream::seekg): Same.
    	* testsuite/27_io/istream_seeks.cc: Fix.
    	
    	libstdc++/3113
    	* include/bits/stl_function.h (binder2nd): Fix as per DR 109.
    	(binder1st): Same.
    	* include/bits/std_queue.h: Add c++config.h.
    	* testsuite/20_util/binders.cc: New test.
    	
    
    Can you please confirm?

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2772&database=gcc


^ permalink raw reply	[flat|nested] 3+ messages in thread

* libstdc++/2772: bind2nd(mem_fun1_ref) does not work
@ 2001-05-08  6:46 eekaikko
  0 siblings, 0 replies; 3+ messages in thread
From: eekaikko @ 2001-05-08  6:46 UTC (permalink / raw)
  To: gcc-gnats

>Number:         2772
>Category:       libstdc++
>Synopsis:       bind2nd(mem_fun1_ref) does not work
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Tue May 08 06:46:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     gcc weekly snapshot
>Release:        gcc version 3.0 20010430 (prerelease)
>Organization:
>Environment:
Debian gnu/linux potato
>Description:
The following code (the whole code is in the attatchment):



    list<myclass> mylist;

    for_each(mylist.begin(), mylist.end(),

             bind2nd(mem_fun1_ref(&myclass::f), 2));



where f = "int f(int i)"

produces this message:



/usr/local/include/g++-v3/bits/stl_function.h: In member function `typename

   _Operation::result_type std::binder2nd<_Operation>::operator()(typename

   _Operation::first_argument_type&) const [with _Operation =

   std::mem_fun1_ref_t<int, myclass, int>]':

/usr/local/include/g++-v3/bits/stl_algo.h:90:   instantiated from `_Function std::for_each(_InputIter, _InputIter, _Function) [with _InputIter = std::_List_iterator<myclass, myclass&, myclass*>, _Function = std::binder2nd<std::mem_fun1_ref_t<int, myclass, int> >]'

testaus.cpp:23:   instantiated from here

/usr/local/include/g++-v3/bits/stl_function.h:224: no match for call to `(const

   std::mem_fun1_ref_t<int, myclass, int>) (const myclass&, const int&)'

/usr/local/include/g++-v3/bits/stl_function.h:578: candidates are: _Ret

   std::mem_fun1_ref_t<_Ret, _Tp, _Arg>::operator()(_Tp&, _Arg) const [with

   _Ret = int, _Tp = myclass, _Arg = int]





(See also bug #470, it seems to relate to this.)



I have tried also an older gcc-snapshot and 2.95.2 (with its own library). They produce the same error.
>How-To-Repeat:
By trying to compile (g++ testaus.cpp).
>Fix:
?
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-06-26 17:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-26 17:16 libstdc++/2772: bind2nd(mem_fun1_ref) does not work bkoz
  -- strict thread matches above, loose matches on Subject: below --
2001-06-11 12:11 bkoz
2001-05-08  6:46 eekaikko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).