I am working with latest version of MSVC, clang and gcc. The two last ones accept the following code, but MSVC rejects it. Is MSVC right? Or is it a bug?
struct A {
int a, b, c;
};
template <typename T> constexpr auto construct_impl() {
return [](auto &&... xs) -> decltype(T{xs...}) { return T{xs...}; };
}
int main() {
auto a = construct_impl<A>()(0, 1, 2);
return 0;
}