https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104108

            Bug ID: 104108
           Summary: [10/11/12 Regression] template alias inside template
                    with static field of template class rejected
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take which I accidently reduced from PR 104107:
template<template<const int&> typename tt_w_data>
struct tt_main {
  static int m_parameter;
  template<template<const int&> typename t_data> using t_make 
    = t_data<m_parameter>;
};

This should be valid code but currently we reject it with:
<source>:5:25: error: '& tt_main<tt_w_data>::m_parameter' is not a valid
template argument of type 'const int&' because
'tt_main<tt_w_data>::m_parameter' is not a variable
    5 |     = t_data<m_parameter>;
      |                         ^

I don't see how tt_main<tt_w_data>::m_parameter is not a variable because it
looks like one to me.

Reply via email to