Я хочу знать, какой компилятор здесь находится? Демо
Код: Выделить всё
#include
template
void func(T (&)[sizeof...(Indices)]);
int main()
{
int arr[4];
func(arr); //msvc rejects but clang and gcc accepts
}
Код: Выделить всё
source>(11): error C2182: 'func': this use of 'void' is not valid
(11): error C2988: unrecognizable template declaration/definition
(11): error C2059: syntax error: ')'
(13): error C2143: syntax error: missing ';' before '{'
(13): error C2447: '{': missing function header (old-style formal list?)
Подробнее здесь: https://stackoverflow.com/questions/782 ... ot-in-msvc
Мобильная версия