<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </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 --- - bogus "non-type template argument specializes a template parameter with dependent type" for in-class partial specialization"
   href="http://llvm.org/bugs/show_bug.cgi?id=16519">16519</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>bogus "non-type template argument specializes a template parameter with dependent type" for in-class partial specialization
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </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>normal
          </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>richard-llvm@metafoo.co.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Clang rejects this:


template<typename T, T...N> struct integer_sequence { typedef T value_type; };

template<typename T> struct __make_integer_sequence;
template<typename T, T N> using make_integer_sequence = typename
__make_integer_sequence<T>::template make<N, N % 2>::type;

template<typename T, typename T::value_type ...Extra> struct
__make_integer_sequence_impl;
template<typename T, T ...N, T ...Extra> struct
__make_integer_sequence_impl<integer_sequence<T, N...>, Extra...> {
  typedef integer_sequence<T, N..., sizeof...(N) + N..., Extra...> type;
};

template<typename T> struct __make_integer_sequence {
  template<T N, T Parity, typename = void> struct make;
  template<typename Dummy> struct make<0, 0, Dummy> { typedef
integer_sequence<T> type; };
  template<typename Dummy> struct make<1, 1, Dummy> { typedef
integer_sequence<T, 0> type; };
  template<T N, typename Dummy> struct make<N, 0, Dummy> :
__make_integer_sequence_impl<make_integer_sequence<T, N/2>> {};
  template<T N, typename Dummy> struct make<N, 1, Dummy> :
__make_integer_sequence_impl<make_integer_sequence<T, N/2>, N> {};
};

using X = make_integer_sequence<int, 5>;


... saying ...

<stdin>:13:40: error: non-type template argument specializes a template
parameter with dependent type 'T'
  template<typename Dummy> struct make<0, 0, Dummy> { typedef
integer_sequence<T> type; };
                                       ^
<stdin>:12:14: note: template parameter is declared here
  template<T N, T Parity, typename = void> struct make;
             ^

This is incorrect: the template parameter does not have a dependent type in a
specialization of __make_integer_sequence, therefore the template has valid
specializations, therefore we are not permitted to reject it.</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>