http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56762
Daniel Krügler <daniel.kruegler at googlemail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |daniel.kruegler at | |googlemail dot com --- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> 2013-03-28 12:15:30 UTC --- This line does not what you expect it would do (Search for "most vexing parse"): CLockGuard<CIntLock> sGuard(CIntLock()); It does *not* construct an CIntLock object nor does it declare an sGuard object, instead it does declare a function and has no further effects.