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 libstdc++/37351] New: std::result_of requires nested template


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


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