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++/54913] [4.8 Regression] qualified lookup in ctor of class template fails to find static member of reference type


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.8 Regression]            |[4.8 Regression] qualified
                   |'#'indirect_ref' not        |lookup in ctor of class
                   |supported by                |template fails to find
                   |dump_decl#<declaration      |static member of reference
                   |error>' is not a member of  |type
                   |'E'                         |

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-10-13 17:17:37 UTC ---
Reduced:

struct E
{
  static const int& e;
};

template<typename>
struct R
{
  R() { E::e; }
};

R<int> r;

The error goes away unless:

 - E::e is a reference
 - R is a template
 - the lookup is in a constructor


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