<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 - clang 4.0 template template partial specialization bug"
   href="https://bugs.llvm.org/show_bug.cgi?id=33294">33294</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang 4.0 template template partial specialization bug
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>4.0
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>paul@preney.ca
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=18569" name="attach_18569" title="Program demonstrating clang++ v4.0 issue">attachment 18569</a> <a href="attachment.cgi?id=18569&action=edit" title="Program demonstrating clang++ v4.0 issue">[details]</a></span>
Program demonstrating clang++ v4.0 issue

Attached is code that shows a bug with the clang++ v4.0 compiler. Such compiles
fine with all versions of GCC and code like this has worked with clang++ v3.9
and earlier.

Specifically, compiling with GCC (e.g., v5, 6, and 7) compiles without issues:

  g++-7.1.0 -std=c++14 -Wall -Wextra -pedantic tt.cxx

and runs:

  $ ./a.out
  10
  10
  $

Unfortunately, clang++-4.0 outputs these errors:

$ clang++-4.0 -std=c++14 -Wall -Wextra -pedantic tt.cxx
tt.cxx:24:27: error: template template argument has different template
parameters than its corresponding template template parameter
struct is_valuett<valuett<TT>> final : std::true_type { };
                          ^
tt.cxx:23:34: note: template non-type parameter has a different type 'T' in
template argument
template <template <typename T, T> class TT>
                                 ^
tt.cxx:17:34: note: previous non-type template parameter with type 'T' is here
template <template <typename T, T> class TT>
                                 ^
tt.cxx:24:1: error: cannot combine with previous '(error)' declaration
specifier
struct is_valuett<valuett<TT>> final : std::true_type { };
^
2 errors generated.
zsh: exit 1     clang++-4.0 -std=c++14 -Wall -Wextra -pedantic tt.cxx
$</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>