Considering following code:
struct MyType{};
MyType myFunction() __attribute__ ((warn_unused_result))
{
return MyType{};
}
int main()
{
myFunction();
auto storMyType = myFunction();
}
Not storing the return value of myFunction
is a logical error and I want to have a compilation error on all compilers. Is there any equivalent for Visual Studio 2013?