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 |
Eric Fiselier | a73d092 | 2015-08-22 21:24:01 +0000 | [diff] [blame] | 11 | // UNSUPPORTED: c++98, c++03, c++11 |
| 12 | |
Howard Hinnant | ba898e4 | 2013-09-21 01:49:28 +0000 | [diff] [blame] | 13 | |
| 14 | // <shared_mutex> |
| 15 | |
| 16 | // template <class Mutex> |
| 17 | // class shared_lock |
| 18 | // { |
| 19 | // public: |
| 20 | // typedef Mutex mutex_type; |
| 21 | // ... |
| 22 | // }; |
| 23 | |
| 24 | #include <shared_mutex> |
| 25 | #include <type_traits> |
| 26 | |
| 27 | int main() |
| 28 | { |
Howard Hinnant | ba898e4 | 2013-09-21 01:49:28 +0000 | [diff] [blame] | 29 | static_assert((std::is_same<std::shared_lock<std::mutex>::mutex_type, |
| 30 | std::mutex>::value), ""); |
Howard Hinnant | ba898e4 | 2013-09-21 01:49:28 +0000 | [diff] [blame] | 31 | } |