http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36587
Johannes Schaub <schaub.johannes at googlemail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |schaub.johannes@googlemail. | |com --- Comment #7 from Johannes Schaub <schaub.johannes at googlemail dot com> --- (In reply to Jonathan Wakely from comment #3) > This would have prevented bugs I've dealt with where critical sections where > not protected: > { > lock_guard (mutex); > // mutex NOT locked here! > } > Jonathan, unfortunately that code won't create and discard a temporary object, so I am not sure whether this patch would have caught the mistake of creating a default constructed lock_guard (whatever that means).