Howard Hinnant | ba898e4 | 2013-09-21 01:49:28 +0000 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 6 | // Source Licenses. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
Jonathan Roelofs | 8d86b2e | 2014-09-05 19:45:05 +0000 | [diff] [blame] | 9 | // |
| 10 | // UNSUPPORTED: libcpp-has-no-threads |
Howard Hinnant | ba898e4 | 2013-09-21 01:49:28 +0000 | [diff] [blame] | 11 | |
| 12 | // <shared_mutex> |
| 13 | |
| 14 | // template <class Mutex> |
| 15 | // class shared_lock |
| 16 | // { |
| 17 | // public: |
| 18 | // typedef Mutex mutex_type; |
| 19 | // ... |
| 20 | // }; |
| 21 | |
| 22 | #include <shared_mutex> |
| 23 | #include <type_traits> |
| 24 | |
| 25 | int main() |
| 26 | { |
Dan Albert | 1d4a1ed | 2016-05-25 22:36:09 -0700 | [diff] [blame^] | 27 | #if _LIBCPP_STD_VER > 11 |
Howard Hinnant | ba898e4 | 2013-09-21 01:49:28 +0000 | [diff] [blame] | 28 | static_assert((std::is_same<std::shared_lock<std::mutex>::mutex_type, |
| 29 | std::mutex>::value), ""); |
Dan Albert | 1d4a1ed | 2016-05-25 22:36:09 -0700 | [diff] [blame^] | 30 | #endif // _LIBCPP_STD_VER > 11 |
Howard Hinnant | ba898e4 | 2013-09-21 01:49:28 +0000 | [diff] [blame] | 31 | } |