Bug ID: 78001
           Summary: [7 Regression] ncurses build error
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot
          Reporter: trippels at gcc dot
  Target Milestone: ---

markus@x4 tmp % cat cursesf.ii
class A {
  void m_fn1();
template <class> struct B : A {
  void m_fn2() const { m_fn1(); }

markus@x4 tmp % icpc -c cursesf.ii
markus@x4 tmp % clang++ -c cursesf.ii
markus@x4 tmp % g++-6 -c cursesf.ii
markus@x4 tmp % g++ -c cursesf.ii
cursesf.ii: In member function ‘void B< <template-parameter-1-1> >::m_fn2()
cursesf.ii:6:30: error: no matching function for call to ‘B<
<template-parameter-1-1> >::m_fn1() const’
   void m_fn2() const { m_fn1(); }
cursesf.ii:3:8: note: candidate: void A::m_fn1() <near match>
   void m_fn1();
cursesf.ii:3:8: note:   passing ‘const B< <template-parameter-1-1> >*’ as
‘this’ argument discards qualifiers

Reply via email to