------- Comment #5 from dgregor at gcc dot gnu dot org 2007-05-30 19:59 ------- The rvalue references patch (PR 29939) also implements reference collapsing as described in core issue 106.
Unfortunately, however, Wolfgang's test case does not work even with reference collapsing due to an interaction with library issue 109 (http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#109), which means that instantiating a binder with a reference type results in errors like the following: /Volumes/scratch/dgregor/gcc0x-install/lib/gcc/powerpc-apple-darwin8.9.0/4.3.0/../../../../include/c++/4.3.0/bits/stl_function.h: In instantiation of 'std::binder2nd<std::pointer_to_binary_function<const int&, const int&, void> >': honk.cpp:4: instantiated from here /Volumes/scratch/dgregor/gcc0x-install/lib/gcc/powerpc-apple-darwin8.9.0/4.3.0/../../../../include/c++/4.3.0/bits/stl_function.h:445: error: 'typename _Operation::result_type std::binder2nd<_Operation>::operator()(typename _Operation::first_argument_type&) const [with _Operation = std::pointer_to_binary_function<const int&, const int&, void>]' cannot be overloaded /Volumes/scratch/dgregor/gcc0x-install/lib/gcc/powerpc-apple-darwin8.9.0/4.3.0/../../../../include/c++/4.3.0/bits/stl_function.h:439: error: with 'typename _Operation::result_type std::binder2nd<_Operation>::operator()(const typename _Operation::first_argument_type&) const [with _Operation = std::pointer_to_binary_function<const int&, const int&, void>]' With some work on the library side, we should be able to fix this problem. But, I consider that a separate issue. -- dgregor at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dgregor at gcc dot gnu dot | |org Last reconfirmed|2006-03-05 03:54:05 |2007-05-30 19:59:36 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7412