I am working on a multi-platform project, and on some platforms there are disabled functions, and in the interface for these functions I usually do the following:
bool Foo::bar() const {
abort();
}
GCC / LLVM do not require non-void functions to return values (they just give a warning), and in this case, when I call abort(), they are smart enough to not even give warnings (since the function will never return).
Is there a way (compile a flag?) To force Visual C ++ 2010 to behave the same, so I am not breaking the build of Windows? I know that I can always return a value after an interrupt, but when working on other platforms, I usually forget about it, and behavior that does not give an error seems more appropriate.
source
share