https://bugs.llvm.org/show_bug.cgi?id=33294

            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: unassignedb...@nondot.org
          Reporter: p...@preney.ca
                CC: llvm-bugs@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
  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
$

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to