https://bugs.llvm.org/show_bug.cgi?id=35866
Bug ID: 35866
Summary: Strange compiler error about the subsequent template
parameter when a std::size_t template parameter
becomes negative
Product: clang
Version: unspecified
Hardware: PC
OS: MacOS X
Status: NEW
Severity: enhancement
Priority: P
Component: C++11
Assignee: unassignedclangb...@nondot.org
Reporter: xax...@gmail.com
CC: dgre...@apple.com, llvm-bugs@lists.llvm.org
Strange compiler error about the subsequent template parameter when a
std::size_t template parameter becomes negative
https://godbolt.org/g/TJRJYK
#include <type_traits>
#include <tuple>
struct C2 {
template<int default_arg_position = -1, class DefaultArgsTuple =
std::tuple<>>
int operator()(){return 5;}
};
template<class... Ts>
void stuff(Ts&&...) {}
struct C1 {
template<std::size_t... ArgIndexes>
void operator()() {
constexpr int i = 1; // <=== THIS LINE
// constexpr int i = 0; // works OK
stuff(
C2{}.operator()<ArgIndexes - i>()...
);
}
};
int main() {
C1{}.operator()<0>();
}
--
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