I just ran across this in some sample code and I've never seen it used before. For an inline function which returns a type but the return value is not used, the author preceded the call with a (void)
. Does this actually do anything?
Example:
inline some_object& SomeClass::doSomething();
SomeClass o;
(void)o.doSomething();