Imported Upstream version 1.71.0
[platform/upstream/boost.git] / boost / histogram / detail / noop_mutex.hpp
1 // Copyright 2019 Hans Dembinski
2 //
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt
5 // or copy at http://www.boost.org/LICENSE_1_0.txt)
6
7 #ifndef BOOST_HISTOGRAM_DETAIL_NOOP_MUTEX_HPP
8 #define BOOST_HISTOGRAM_DETAIL_NOOP_MUTEX_HPP
9
10 namespace boost {
11 namespace histogram {
12 namespace detail {
13
14 struct noop_mutex {
15   bool try_lock() noexcept { return true; }
16   void lock() noexcept {}
17   void unlock() noexcept {}
18 };
19
20 } // namespace detail
21 } // namespace histogram
22 } // namespace boost
23
24 #endif