<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - An unfixed bug?"
   href="https://bugs.llvm.org/show_bug.cgi?id=37822">37822</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>An unfixed bug?
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>zhonghao@pku.org.cn
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The code is as follow:

template<bool, typename> struct enable_if {};
template<typename T> struct enable_if<true,T> {
 typedef T type;
};
template<typename _Tp, int _Nm> struct array {
 void at(int n) {
 _M_check<_Nm>(n);
 }
 template<int _Mm> typename enable_if<_Mm, void>::type _M_check(int) const { }
 // template<int _Mm> typename enable_if<_Mm!=0, void>::type _M_check(int)
const { }
};
int main(){
 array<double,3> a;
 a.at(0);
}

It comes from a previous bug report: <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - no implicit conversion in template values"
   href="show_bug.cgi?id=8650">https://bugs.llvm.org/show_bug.cgi?id=8650</a>

It is said to be fixed. However, when I compile the above code with the latest
clang++, it produces the following errors:


/home/haozhong/project/approach/otherreport/llvm/tmp/llvm_8650/code0.c.cpp:7:2:
error: no matching member function for call to '_M_check'
     _M_check<_Nm>(n);
     ^~~~~~~~~~~~~
   
/home/haozhong/project/approach/otherreport/llvm/tmp/llvm_8650/code0.c.cpp:14:4:
note: in instantiation of member function 'array<double, 3>::at' requested here
     a.at(0);
       ^
   
/home/haozhong/project/approach/otherreport/llvm/tmp/llvm_8650/code0.c.cpp:9:56:
note: candidate template ignored: substitution failure [with _Mm = 3]: non-type
template argument evaluates to 3, which cannot be narrowed to type 'bool'
     template<int _Mm> typename enable_if<_Mm, void>::type _M_check(int) const
{ }
                                          ~~~              ^
    1 error generated.

Is the bug not fully fixed?</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>