https://bugs.llvm.org/show_bug.cgi?id=42757
Bug ID: 42757
Summary: Template deduction fails with defaulted argument
that's an index_sequence
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
Reduced from StackOverflow (https://stackoverflow.com/q/57206006/2069064):
#include <utility>
#include <cstdint>
template <std::size_t S, class=std::make_index_sequence<S>>
struct FooList;
template <std::size_t S, std::size_t... Idxs>
struct FooList<S, std::integer_sequence<std::size_t, Idxs...>> { };
template <std::size_t S>
void foobar(FooList<S>) { }
void test() {
foobar(FooList<5>{});
}
This fails to compile on clang, the candidate is rejected with the note:
candidate template ignored: could not match '__make_integer_seq' against
'integer_sequence'
Even though these are the same type. This compiles on gcc.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs