title: How to implement scoped_lock functionality in c++11 using lock_guard
body: <p>Looks like <a href="https://en.cppreference.com/w/cpp/thread/scoped_lock/scoped_lock" rel="nofollow noreferrer">scoped_lock</a> in c++17 gives the functionality I'm after however I'm presently tied to c++11.</p>
  
  <p>At the moment I'm seeing deadlock issues with guard_lock when we call it with the same mutex more than once. Does scoped_lock protect against multiple calls (i.e. reenterent?)?
  Is there a best practice for doing this in c++11 w/ lock_guard?</p>
  
  <pre><code>mutex lockingMutex;
  
  void get(string s)
  {
      lock_guard&lt;mutex&gt; lock(lockingMutex);
      if (isPresent(s))
      {
          //....
      }
  }
  
  bool isPresent(string s)
  {
      bool ret = false;
      lock_guard&lt;mutex&gt; lock(lockingMutex);
      //....
      return ret;
  }
  </code></pre>