SharedMutex concept implementation I was curious to implement something similar to SharedMutex concept.
So far only 4 methods implemented. I decided to omit try_lock, try_lock_shared and native_handle for the sake of simplicity.

#ifndef READ_WRITE_MUTEX_H__
#define READ_WRITE_MUTEX_H__

#include &lt;atomic&gt;
#include &lt;mutex&gt;
#include &lt;condition_variable&gt;


struct ReadWriteMutex {

  void lock() { // block everyone
    std::unique_lock&lt;std::mutex&gt; lock(_mutex);

    if (_writing || _readers &gt; 0) {
      // wait while writer and/or reader(s) have finished
      _cv_writing.wait(lock, [this] {return !_writing &amp;&amp; _readers == 0;});
    }

    _writing = true;  // set flag to block everyone
                      // current thread continue run
  }

  void unlock() {
    std::lock_guard&lt;std::mutex&gt; lock(_mutex);
    _writing = false;
    _cv_writing.notify_all();
    _cv_reading.notify_all();
  }

  void lock_shared() { // block writers, allow readers
    std::unique_lock&lt;std::mutex&gt; lock(_mutex);
    if (_writing) { // we should wait : writer is working
      _cv_reading.wait(lock, [this] {return !_writing; });
    }

    ++_readers;
  }

  void unlock_shared() {
    std::lock_guard&lt;std::mutex&gt; lock(_mutex);
    if (--_readers == 0) {
      _cv_writing.notify_all();
    }

  }

private:
  mutable std::mutex _mutex;
  mutable std::condition_variable _cv_writing;
  mutable std::condition_variable _cv_reading;

  std::atomic&lt;bool&gt; _writing = false;
  std::atomic&lt;int&gt; _readers = 0;

};

#endif // READ_WRITE_MUTEX_H__


C++11 support assumed.
Just a quick heads up about your use of leading underscores. This is discouraged because they are reserved by the standard.
You should find another way to mark variables as members (if you find it's necessary). I've seen a lot of people using trailing underscores for this. In my opinion trailing indentifiers are smarter as otherwise you will have to type whatever prefix you picked everytime you want to address a member variable (which also slows down autocomplete).