#include <type_traits>
auto f()
{
struct A { int f() { return 0; } };
return A();
}
int main()
{
std::remove_cvref_t<decltype(f())> a;
return a.f();
}
The code above can be compiled successfully. I just wonder:
Is it legal as per the C++ standard?
Aucun commentaire:
Enregistrer un commentaire