[libstdc++ patch] Fix ambiguity in calls to bind

Douglas Gregor doug.gregor@gmail.com
Fri Apr 1 15:28:00 GMT 2005


A recent change to mainline GCC exposed an ambiguity in function template 
partial ordering for tr1::bind. The compiler is right, so here's the 
"obvious" fix.

Tested i686-pc-linux-gnu on mainline; no regressions. Okay for mainline?
This will also be needed on the 4.0 branch. Assuming all tests pass there, 
okay for 4.0 branch?

 Doug

005-04-01  Douglas Gregor  <doug.gregor@gmail.com>

 * include/tr1/functional (_Maybe_wrap_member_pointer): Wrap up
 member pointers in _Mem_fn but let other function objects pass
 through unchanged.
 * include/tr1/functional_iterator (bind): Reduce number of bind()
 overloads to two to eliminate ambiguities. Use
 _Maybe_wrap_member_pointer to handle member pointers gracefully.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bind-ambig-fix.patch
Type: text/x-diff
Size: 5021 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20050401/a7f3c987/attachment.bin>


More information about the Libstdc++ mailing list