[Bug c++/42877] [C++0x] ICE when checking the type of a lambda

2010-02-09 Thread jason at gcc dot gnu dot org


--- Comment #7 from jason at gcc dot gnu dot org  2010-02-09 21:39 ---


*** This bug has been marked as a duplicate of 42370 ***


-- 

jason at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


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



[Bug c++/42877] [C++0x] ICE when checking the type of a lambda

2010-01-26 Thread paolo dot carlini at oracle dot com


--- Comment #3 from paolo dot carlini at oracle dot com  2010-01-26 17:58 
---
The below is enough. I'm adding in CC Jason, in case the fix for these three
open issues turns out to be safe enough for 4.5.0.

//

template typename T struct toff;

template typename TR, typename TA struct toffTR (*)(TA)
{
  typedef TR type;
};

template typename T void dem(T op)
{
  typedef typename toffdecltype(T::operator ())::type r_type;
}

int main()
{
  dem([](int x){ return x; });
}


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 CC||jason at gcc dot gnu dot org


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



[Bug c++/42877] [C++0x] ICE when checking the type of a lambda

2010-01-26 Thread jwakely dot gcc at gmail dot com


--- Comment #4 from jwakely dot gcc at gmail dot com  2010-01-26 18:07 
---
I assume the original version is also intended to work with non-empty captures,
when operator() is non-static


-- 


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



[Bug c++/42877] [C++0x] ICE when checking the type of a lambda

2010-01-26 Thread paolo dot carlini at oracle dot com


--- Comment #5 from paolo dot carlini at oracle dot com  2010-01-26 18:12 
---
My hope is that the problem with canonical types is the same and localized in
the C++0x bits of the front-end, across all the issues of this family, thus,
to repeat, PR42082 and PR42737 too.


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-01-26 18:12:20
   date||


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



[Bug c++/42877] [C++0x] ICE when checking the type of a lambda

2010-01-26 Thread piotr dot wyderski at gmail dot com


--- Comment #6 from piotr dot wyderski at gmail dot com  2010-01-26 20:09 
---
(In reply to comment #4)
 I assume the original version is also intended to work with non-empty 
 captures,
 when operator() is non-static

Yes, that's the purpose of the first two specializations.
But that part works correctly, only the function ptr variant ICEs.


-- 


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