[Bug c++/45282] New: wrong decltype result for .*

jason at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Aug 13 20:51:00 GMT 2010


This testcase should compile without error, as a .* is an rvalue if the LHS is
an rvalue.

struct A { int i; };
int A::*ipm = &A::i;

template <class T, class U> class assert_same_type;
template <class T> class assert_same_type<T,T> { };

assert_same_type<decltype(A().*ipm),int> x2;


-- 
           Summary: wrong decltype result for .*
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jason at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list