http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058
Paolo Carlini paolo.carlini at oracle dot com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058
--- Comment #21 from Jason Merrill jason at gcc dot gnu.org 2011-05-23
15:32:42 UTC ---
Author: jason
Date: Mon May 23 15:32:39 2011
New Revision: 174073
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=174073
Log:
PR c++/49058
*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058
Paolo Carlini paolo.carlini at oracle dot com changed:
What|Removed |Added
CC|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058
--- Comment #8 from Jonathan Wakely redi at gcc dot gnu.org 2011-05-22
21:23:12 UTC ---
It would be wrong though, consider:
struct F {
int operator();
void operator() const;
};
the decltype would detect the return type as 'int' but the
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058
--- Comment #10 from Jonathan Wakely redi at gcc dot gnu.org 2011-05-22
21:29:56 UTC ---
For a complete example:
struct F {
int operator()() const { return 0; }
void operator()() const { };
};
int main()
{
auto const b = std::bind( F() );
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058
--- Comment #9 from Jonathan Wakely redi at gcc dot gnu.org 2011-05-22
21:24:16 UTC ---
Duh, sorry, that should have been
struct F {
int operator()();
void operator()() const;
};
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058
--- Comment #11 from Jonathan Wakely redi at gcc dot gnu.org 2011-05-22
21:32:05 UTC ---
(In reply to comment #10)
For a complete example:
struct F {
int operator()() const { return 0; }
void operator()() const { };
sigh, I should
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058
--- Comment #12 from Paolo Carlini paolo.carlini at oracle dot com 2011-05-22
21:47:04 UTC ---
Ok, let's make sure to have something similar in the testsuite.
And, well, I still believe a tangle of auto return types shouldn't be really
necessary
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058
--- Comment #14 from Paolo Carlini paolo.carlini at oracle dot com 2011-05-22
22:20:24 UTC ---
Sorry, hit return inadvertently. Anyway, the idea would be, instead of just
writing:
const _Functor
writing something like:
typename
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058
--- Comment #13 from Paolo Carlini paolo.carlini at oracle dot com 2011-05-22
22:17:10 UTC ---
What about creating an artificially dependent context, thus amenable to SFINAE,
like:
// Call as const
templatetypename... _Args, typename _Result
=
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058
--- Comment #15 from Paolo Carlini paolo.carlini at oracle dot com 2011-05-22
22:30:55 UTC ---
This is something which actually passes the testsuite, and the tests here and
the new test explained by Jon. Maybe something even more clean along the
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058
--- Comment #16 from Paolo Carlini paolo.carlini at oracle dot com 2011-05-22
22:52:13 UTC ---
With enable_if becomes a tad more concise.
///
Index: include/std/functional
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058
--- Comment #17 from Jonathan Wakely redi at gcc dot gnu.org 2011-05-22
23:09:06 UTC ---
nice trick, if that passes the testsuite I'd check it in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058
--- Comment #18 from paolo at gcc dot gnu.org paolo at gcc dot gnu.org
2011-05-23 00:05:29 UTC ---
Author: paolo
Date: Mon May 23 00:05:24 2011
New Revision: 174048
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=174048
Log:
2011-05-22
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058
--- Comment #20 from Paolo Carlini paolo.carlini at oracle dot com 2011-05-23
00:10:24 UTC ---
Thanks Jon. Thus, library issue fixed in mainline and 4_6-branch.
Jason, I think you can safely commit the compiler change in mainline...
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058
Paolo Carlini paolo.carlini at oracle dot com changed:
What|Removed |Added
Status|ASSIGNED|NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058
--- Comment #19 from paolo at gcc dot gnu.org paolo at gcc dot gnu.org
2011-05-23 00:09:00 UTC ---
Author: paolo
Date: Mon May 23 00:08:52 2011
New Revision: 174049
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=174049
Log:
2011-05-22
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058
Jason Merrill jason at gcc dot gnu.org changed:
What|Removed |Added
CC||redi at gcc dot
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058
Jason Merrill jason at gcc dot gnu.org changed:
What|Removed |Added
Status|ASSIGNED|NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058
Jonathan Wakely redi at gcc dot gnu.org changed:
What|Removed |Added
Status|NEW |ASSIGNED
20 matches
Mail list logo