tuple (241900) | tuple (242939) |
---|---|
1// -*- C++ -*- 2//===--------------------------- tuple ------------------------------------===// 3// 4// The LLVM Compiler Infrastructure 5// 6// This file is distributed under the University of Illinois Open Source 7// License. See LICENSE.TXT for details. 8// --- 128 unchanged lines hidden (view full) --- 137#endif 138 139// uses_allocator 140 141template <class _Tp> 142struct __has_allocator_type 143{ 144private: | 1// -*- C++ -*- 2//===--------------------------- tuple ------------------------------------===// 3// 4// The LLVM Compiler Infrastructure 5// 6// This file is distributed under the University of Illinois Open Source 7// License. See LICENSE.TXT for details. 8// --- 128 unchanged lines hidden (view full) --- 137#endif 138 139// uses_allocator 140 141template <class _Tp> 142struct __has_allocator_type 143{ 144private: |
145 struct __two {char _; char __;}; | 145 struct __two {char __lx; char __lxx;}; |
146 template <class _Up> static __two __test(...); 147 template <class _Up> static char __test(typename _Up::allocator_type* = 0); 148public: 149 static const bool value = sizeof(__test<_Tp>(0)) == 1; 150}; 151 152template <class _Tp, class _Alloc, bool = __has_allocator_type<_Tp>::value> 153struct __uses_allocator --- 939 unchanged lines hidden --- | 146 template <class _Up> static __two __test(...); 147 template <class _Up> static char __test(typename _Up::allocator_type* = 0); 148public: 149 static const bool value = sizeof(__test<_Tp>(0)) == 1; 150}; 151 152template <class _Tp, class _Alloc, bool = __has_allocator_type<_Tp>::value> 153struct __uses_allocator --- 939 unchanged lines hidden --- |