This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/42877] [C++0x] ICE when checking the type of a lambda
- From: "paolo dot carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jan 2010 17:58:08 -0000
- Subject: [Bug c++/42877] [C++0x] ICE when checking the type of a lambda
- References: <bug-42877-17090@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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