The problem there is not with auto, it's with the function naming. If you don't know what the function lock does, how would writing Lock l = lock() help? Also, stage1 and stage2 are awful function names in this context.
Clearly that was an example created to demonstrate the lambda idiom, it wasnt real code