This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



------- 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 toff<TR (*)(TA)>
{
  typedef TR type;
};

template <typename T> void dem(T op)
{
  typedef typename toff<decltype(&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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]