public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/35569]  New: std::[tr1::]bind result functor doesn't accept rvalues
@ 2008-03-13 14:55 rodolfo at rodsoft dot org
  2008-10-02 17:29 ` [Bug libstdc++/35569] [c++0x] std::bind " paolo dot carlini at oracle dot com
                   ` (13 more replies)
  0 siblings, 14 replies; 17+ messages in thread
From: rodolfo at rodsoft dot org @ 2008-03-13 14:55 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2888 bytes --]

The following code doesn't compile with gcc-4.3.0 on c++0x mode:

using std;
using std::placeholders;
bind(multiplies<int>(),4,_1)(5);

g++ outputs:

teste.cpp:2: error: no match for call to ‘(std::_Bind<std::multiplies<int>
()(st
d::_Placeholder<1>, int)>) (int)’
/usr/local/lib/gcc/i686-pc-linux-gnu/4.3.0/../../../../include/c++/4.3.0/tr1_imp
l/functional:1189: note: candidates are: typename std::result_of<_Functor
()(typ
ename std::result_of<std::_Mu<_Bound_args, std::is_bind_expression::value,
(std:
:is_placeholder::value > 0)> ()(_Bound_args, std::tuple<_UElements ...>)>::type 
...)>::type std::_Bind<_Functor ()(_Bound_args ...)>::operator()(_Args& ...)
[wi
th _Args = int, _Functor = std::multiplies<int>, _Bound_args =
std::_Placeholder
<1>, int]
/usr/local/lib/gcc/i686-pc-linux-gnu/4.3.0/../../../../include/c++/4.3.0/tr1_imp
l/functional:1200: note:                 typename std::result_of<const _Functor 
()(typename std::result_of<std::_Mu<_Bound_args,
std::is_bind_expression::value,
 (std::is_placeholder::value > 0)> ()(_Bound_args, std::tuple<_UElements
...>)>:
:type ...)>::type std::_Bind<_Functor ()(_Bound_args ...)>::operator()(_Args&
..
.) const [with _Args = int, _Functor = std::multiplies<int>, _Bound_args =
std::
_Placeholder<1>, int]
/usr/local/lib/gcc/i686-pc-linux-gnu/4.3.0/../../../../include/c++/4.3.0/tr1_imp
l/functional:1212: note:                 typename std::result_of<volatile
_Funct
or ()(typename std::result_of<std::_Mu<_Bound_args,
std::is_bind_expression::val
ue, (std::is_placeholder::value > 0)> ()(_Bound_args, std::tuple<_UElements
...>
)>::type ...)>::type std::_Bind<_Functor ()(_Bound_args
...)>::operator()(_Args&
 ...) volatile [with _Args = int, _Functor = std::multiplies<int>, _Bound_args
=
 std::_Placeholder<1>, int]
/usr/local/lib/gcc/i686-pc-linux-gnu/4.3.0/../../../../include/c++/4.3.0/tr1_imp
l/functional:1225: note:                 typename std::result_of<const volatile 
_Functor ()(typename std::result_of<std::_Mu<_Bound_args,
std::is_bind_expressio
n::value, (std::is_placeholder::value > 0)> ()(_Bound_args,
std::tuple<_UElement
s ...>)>::type ...)>::type std::_Bind<_Functor ()(_Bound_args
...)>::operator()(
_Args& ...) const volatile [with _Args = int, _Functor = std::multiplies<int>,
_
Bound_args = std::_Placeholder<1>, int]

It seems that std::_Bind operator() doesn't accept rvalues. Maybe the arguments
should be passed by rvalue-references and std::forward'ed to the underlying
function (or functor).


-- 
           Summary: std::[tr1::]bind result functor doesn't accept rvalues
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rodolfo at rodsoft dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35569


^ permalink raw reply	[flat|nested] 17+ messages in thread
[parent not found: <bug-35569-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2012-03-19 10:58 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-13 14:55 [Bug libstdc++/35569] New: std::[tr1::]bind result functor doesn't accept rvalues rodolfo at rodsoft dot org
2008-10-02 17:29 ` [Bug libstdc++/35569] [c++0x] std::bind " paolo dot carlini at oracle dot com
2008-11-24 14:56 ` paolo dot carlini at oracle dot com
2009-01-14 19:20 ` jeff at schwabcenter dot com
2009-01-15 11:44 ` jwakely dot gcc at gmail dot com
2009-01-17  0:03 ` cfairles at gcc dot gnu dot org
2009-01-17  1:41 ` bangerth at dealii dot org
2009-01-17  9:04 ` paolo dot carlini at oracle dot com
2009-01-18  3:59 ` bangerth at dealii dot org
2009-06-02 11:52 ` redi at gcc dot gnu dot org
2009-06-05 12:48 ` jwakely dot gcc at gmail dot com
2009-11-11 13:19 ` paolo dot carlini at oracle dot com
2009-11-11 14:05 ` redi at gcc dot gnu dot org
2010-01-12  0:54 ` redi at gcc dot gnu dot org
2010-01-12  0:55 ` redi at gcc dot gnu dot org
     [not found] <bug-35569-4@http.gcc.gnu.org/bugzilla/>
2011-09-07 13:00 ` redi at gcc dot gnu.org
2012-03-19 11:01 ` redi at gcc dot gnu.org

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).