#include <string>
#include <iostream>
#include <tuple>
#include <utility>
template<typename... T> struct test {
using args_type = std::tuple<T...>;
args_type x;
template<std::size_t... I>
void callme(std::index_sequence<I...>) {
int _[] = {(std::get<I>(x).std::tuple_element<I, args_type>::type::~type(), true)...};
}
};
int main() {
}
Komunikat o błędzie jestDlaczego kompilator Clang ++ nie może skompilować następującego kodu szablonu variadic?
clang-3.7 -std=gnu++1y -Wc++14-extensions test.cpp
test.cpp:15:56: error: expected ')'
int _[] = {(std::get<I>(x).std::tuple_element<I, args_type>::type::~type(), true)...};
^
test.cpp:15:20: note: to match this '('
int _[] = {(std::get<I>(x).std::tuple_element<I, args_type>::type::~type(), true)...};
^
1 error generated.
Ten sam kod wydaje się skompilować dobrze z G ++ 4.9.2. Nie mogłem znaleźć jeszcze żadnego odpowiedniego zgłoszenia błędu na stronie Clang.
Skąd ta kopia brzękiem 3,7 pochodzą? Najnowsza wersja LLVM to tylko 3,6. –
@ BillLynch svn. – Columbo
Czy kompiluje się z 3.6? – Qix