Attempt to workaround gcc 4.2 problems with result_of.