Anything in C++ generally comes with its very own footgun.
The one for RAII looks like this:
{
mutex_guard(some_mutex);
foo();
}
What does this do? It locks some_mutex, then immediately unlocks it, then calls foo().