#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() {
}
त्रुटि संदेशक्लैंग ++ कंपाइलर निम्न वैरिएड टेम्पलेट कोड को संकलित करने में विफल क्यों होता है?
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.
एक ही कोड जी के साथ ++ 4.9.2 ठीक संकलित करने के लिए लगता है। मुझे अभी तक क्लैंग पर कोई प्रासंगिक बग रिपोर्ट नहीं मिली।
कहाँ बजना 3.7 की इस प्रति से आया? एलएलवीएम की सबसे हालिया रिलीज केवल 3.6 है। –
@BillLynch svn। – Columbo
क्या यह 3.6 के साथ संकलित करता है? – Qix