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// <tuple> 11 12// template <class... Types> class tuple; 13 14// template <class... Types, class Alloc> 15// struct uses_allocator<tuple<Types...>, Alloc> : true_type { }; 16 17#include <tuple> 18#include <type_traits> 19 20struct A {}; 21 22int main() 23{ 24 { 25 typedef std::tuple<> T; 26 static_assert((std::is_base_of<std::true_type, 27 std::uses_allocator<T, A>>::value), ""); 28 } 29 { 30 typedef std::tuple<int> T; 31 static_assert((std::is_base_of<std::true_type, 32 std::uses_allocator<T, A>>::value), ""); 33 } 34 { 35 typedef std::tuple<char, int> T; 36 static_assert((std::is_base_of<std::true_type, 37 std::uses_allocator<T, A>>::value), ""); 38 } 39 { 40 typedef std::tuple<double&, char, int> T; 41 static_assert((std::is_base_of<std::true_type, 42 std::uses_allocator<T, A>>::value), ""); 43 } 44} 45