public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/42761]  New: std::bind doesn't work for simple class types
@ 2010-01-15 18:13 paolo dot carlini at oracle dot com
  2010-01-15 18:14 ` [Bug libstdc++/42761] " paolo dot carlini at oracle dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-01-15 18:13 UTC (permalink / raw)
  To: gcc-bugs

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

Unfortunately, this very simple example, which we have been discussing for
other reasons, regresses very badly vs tr1. Unfortunately the C++ front-end
doesn't seem ready for a conforming result_of :( Can we prepare a reduced
testcase for Jason?

Maybe he can already tell us whether an error message of the form: "sorry,
unimplemented: unable to determine the declared type of expression
‘declval<X>()()’" points to an issue fixable any time soon...

Otherwise, I'm afraid that for 4.5.0 we have to revert consistently most C++0x
work in <functional>.

///////////////

#include <functional>

struct X {
  typedef int result_type;
  int operator()() { return 0; }
  int operator()() const { return 1; }
};

const auto b = std::bind(X());

b(); // b is const, so must return 1


-- 
           Summary: std::bind doesn't work for simple class types
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: paolo dot carlini at oracle dot com


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


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

end of thread, other threads:[~2010-01-16 17:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-15 18:13 [Bug libstdc++/42761] New: std::bind doesn't work for simple class types paolo dot carlini at oracle dot com
2010-01-15 18:14 ` [Bug libstdc++/42761] " paolo dot carlini at oracle dot com
2010-01-15 18:14 ` paolo dot carlini at oracle dot com
2010-01-15 18:34 ` jwakely dot gcc at gmail dot com
2010-01-15 20:15 ` [Bug c++/42761] " jason at gcc dot gnu dot org
2010-01-15 20:25 ` paolo dot carlini at oracle dot com
2010-01-16 15:23 ` jason at gcc dot gnu dot org
2010-01-16 15:24 ` jason at gcc dot gnu dot org
2010-01-16 17:19 ` redi at gcc dot gnu dot 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).