This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/37351] New: std::result_of requires nested template
- From: "jwakely dot gcc at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Sep 2008 14:48:08 -0000
- Subject: [Bug libstdc++/37351] New: std::result_of requires nested template
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The specification of std::result_of is simpler than std::tr1::result_of, there
is no mention of a nested typename F::template result<F(T1, T2,..., TN)>::type
in the C++0x WP.
The libstdc++ implementation in tr1_impl follows the TR1 spec and so fails on
code like this:
#include <functional>
struct F {
int operator()(int i) { return i+1; }
};
std::result_of<F(int)>::type i = 0;
std::result_of should use something like __typeof__ instead.
--
Summary: std::result_of requires nested template
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jwakely dot gcc at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37351