The deduction guide for std::array requires all types be the same:What is the rationale behind such a requirement? Would there be any significant drawback if different types were allowed instead? For example:
Consider the following snippet:Clang accepts it while GCC rejects the code with the following error:prog.cc:10:5: error: deduction guide 'S::T(B&&) -> S::T' must be declared at namespace scope
As I understand,T for #1 will be deduced using the implicit deduction guide generated from the first ctor. Then x will be initialized using that ctor.