Search code examples
c++cmakebuildcompilation

using std::mutex without including it


I am trying to build openrave on the production branch and I can't understand what I am seeing. The code looks like it isn't including #include <mutex> but it is making use of std::mutex everywhere. I am sure I am missing something. How is that possible? How can the code make use of std::mutex without including it directly?

One example is the file sensorsystem.h (include/openrave/sensorsystem.h) at https://github.com/rdiankov/openrave/tree/production/include/openrave.

Any help would be appreciated.


Solution

  • All their files have #include <openrave/openrave.h> that has #include <openrave/environment.h>, this file contains

    #include <mutex>