#include <iostream>
#include <string>
#include <vector>
struct E {
int a, b, c;
E() = default;
explicit E(const E& e) :
a(e.a), b(e.b), c(e.c)
{}
};
int main()
{
E arr[3] = {};
//auto [a0,b0,c0] = arr; // case1: VC:Error , clang:Error, gcc:Error
//std::cout << "a0 type:" << typeid(a0).name() << std::endl;
auto [a, b, c] { arr }; // case2: VC:Error , clang:Error, gcc:OK
std::cout << "a type:" << typeid(a).name() << std::endl;
auto [a1, b1, c1] (arr); // case3: VC:Error , clang:OK, gcc:OK
std::cout << "a1 type:" << typeid(a1).name() << std::endl;
auto [e, f, g] { arr[0]};
std::cout << "type:" << typeid(e).name() << std::endl;
}
尼玛,这学个屁啊,连标准自己都没想好,让人学个毛。。。。
--
FROM 113.91.210.*