[llvm-bugs] [Bug 33294] New: clang 4.0 template template partial specialization bug

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jun 3 12:44:31 PDT 2017


            Bug ID: 33294
           Summary: clang 4.0 template template partial specialization bug
           Product: new-bugs
           Version: 4.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: paul at preney.ca
                CC: llvm-bugs at lists.llvm.org

Created attachment 18569
  --> https://bugs.llvm.org/attachment.cgi?id=18569&action=edit
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

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
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

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170603/b40c7b35/attachment.html>

More information about the llvm-bugs mailing list