[Bug libstdc++/24818] tr1::reference_wrapper improperly calls nullary function objects
doug dot gregor at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Nov 12 13:31:00 GMT 2005
------- Comment #1 from doug dot gregor at gmail dot com 2005-11-12 13:31 -------
Created an attachment (id=10225)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10225&action=view)
Mainline (4.1.0) patch to test and fix this problem
The fix is trivial. The changes to the test case cause failures that are fixed
by the patch to ref_wrap_iterate.h. All of the tr1/3_function_objects tests
still pass on i686-pc-linux-gnu.
2005-11-12 Douglas Gregor <doug.gregor@gmail.com>
* include/tr1/ref_wrap_iterate.h
(reference_wrapper::operator()()): Don't dereferene the result of
get() before calling it; it's already a reference.
* testsuite/tr1/3_function_objects/reference_wrapper/invoke.cc:
Test nullary calls to reference_wrappers.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24818
More information about the Gcc-bugs
mailing list