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//===----------------------------------------------------------------------===// 9// 10// UNSUPPORTED: libcpp-has-no-threads 11 12// TODO(EricWF) Investigate why typeid(...).name() returns a different string 13// on GCC 4.9 but not newer GCCs. 14// XFAIL: gcc-4.9 15// XFAIL: windows 16 17// THIS TESTS C++03 EXTENSIONS. 18 19// <mutex> 20 21// template <class ...Mutex> class lock_guard; 22 23// Test that the the variadic lock guard implementation mangles the same in 24// C++11 and C++03. This is important since the mangling of `lock_guard` depends 25// on it being declared as a variadic template, even in C++03. 26 27// MODULES_DEFINES: _LIBCPP_ABI_VARIADIC_LOCK_GUARD 28#define _LIBCPP_ABI_VARIADIC_LOCK_GUARD 29#include <mutex> 30#include <string> 31#include <typeinfo> 32#include <cassert> 33 34int main() { 35 const std::string expect = "NSt3__110lock_guardIJNS_5mutexEEEE"; 36 assert(typeid(std::lock_guard<std::mutex>).name() == expect); 37} 38