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

            Bug ID: 52586
           Summary: Failure to partially specialize a class when
                    make_index_sequence is involved
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: vejnar.mar...@gmail.com
                CC: blitzrak...@gmail.com, dgre...@apple.com,
                    erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
                    richard-l...@metafoo.co.uk

The following code fails to compile.

    #include <utility>

    template <typename T, typename Seq>
    struct X;

    template <typename T>
    struct X<T, std::make_index_sequence<sizeof(T)>> {
    };

    X<char, std::make_index_sequence<1>> x;
    // ^^^
    // error: implicit instantiation of undefined template
    // 'X<char, std::integer_sequence<unsigned long, 0>>

See https://godbolt.org/z/o8ejrTGKE

Replacing make_index_sequence<1> with the equivalent index_sequence<0> in the
class template definition works around the issue.

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

Reply via email to