this braces are excess. May be you want write this:
```cpp
{
    boost::mutex::scoped_lock lock_max(task4_5::solution::wait_max_mutex_);
    max_ = std::max( max_, max );
}
```