__functional_base (232924) | __functional_base (242939) |
---|---|
1// -*- C++ -*- 2//===----------------------------------------------------------------------===// 3// 4// The LLVM Compiler Infrastructure 5// 6// This file is dual licensed under the MIT and the University of Illinois Open 7// Source Licenses. See LICENSE.TXT for details. 8// --- 29 unchanged lines hidden (view full) --- 38}; 39 40template <class _Tp> struct _LIBCPP_VISIBLE hash; 41 42template <class _Tp> 43struct __has_result_type 44{ 45private: | 1// -*- C++ -*- 2//===----------------------------------------------------------------------===// 3// 4// The LLVM Compiler Infrastructure 5// 6// This file is dual licensed under the MIT and the University of Illinois Open 7// Source Licenses. See LICENSE.TXT for details. 8// --- 29 unchanged lines hidden (view full) --- 38}; 39 40template <class _Tp> struct _LIBCPP_VISIBLE hash; 41 42template <class _Tp> 43struct __has_result_type 44{ 45private: |
46 struct __two {char _; char __;}; | 46 struct __two {char __lx; char __lxx;}; |
47 template <class _Up> static __two __test(...); 48 template <class _Up> static char __test(typename _Up::result_type* = 0); 49public: 50 static const bool value = sizeof(__test<_Tp>(0)) == 1; 51}; 52 53template <class _Tp> 54struct _LIBCPP_VISIBLE less : binary_function<_Tp, _Tp, bool> --- 9 unchanged lines hidden (view full) --- 64#else // _LIBCPP_HAS_NO_VARIADICS 65 66// __weak_result_type 67 68template <class _Tp> 69struct __derives_from_unary_function 70{ 71private: | 47 template <class _Up> static __two __test(...); 48 template <class _Up> static char __test(typename _Up::result_type* = 0); 49public: 50 static const bool value = sizeof(__test<_Tp>(0)) == 1; 51}; 52 53template <class _Tp> 54struct _LIBCPP_VISIBLE less : binary_function<_Tp, _Tp, bool> --- 9 unchanged lines hidden (view full) --- 64#else // _LIBCPP_HAS_NO_VARIADICS 65 66// __weak_result_type 67 68template <class _Tp> 69struct __derives_from_unary_function 70{ 71private: |
72 struct __two {char _; char __;}; | 72 struct __two {char __lx; char __lxx;}; |
73 static __two __test(...); 74 template <class _Ap, class _Rp> 75 static unary_function<_Ap, _Rp> 76 __test(const volatile unary_function<_Ap, _Rp>*); 77public: 78 static const bool value = !is_same<decltype(__test((_Tp*)0)), __two>::value; 79 typedef decltype(__test((_Tp*)0)) type; 80}; 81 82template <class _Tp> 83struct __derives_from_binary_function 84{ 85private: | 73 static __two __test(...); 74 template <class _Ap, class _Rp> 75 static unary_function<_Ap, _Rp> 76 __test(const volatile unary_function<_Ap, _Rp>*); 77public: 78 static const bool value = !is_same<decltype(__test((_Tp*)0)), __two>::value; 79 typedef decltype(__test((_Tp*)0)) type; 80}; 81 82template <class _Tp> 83struct __derives_from_binary_function 84{ 85private: |
86 struct __two {char _; char __;}; | 86 struct __two {char __lx; char __lxx;}; |
87 static __two __test(...); 88 template <class _A1, class _A2, class _Rp> 89 static binary_function<_A1, _A2, _Rp> 90 __test(const volatile binary_function<_A1, _A2, _Rp>*); 91public: 92 static const bool value = !is_same<decltype(__test((_Tp*)0)), __two>::value; 93 typedef decltype(__test((_Tp*)0)) type; 94}; --- 343 unchanged lines hidden --- | 87 static __two __test(...); 88 template <class _A1, class _A2, class _Rp> 89 static binary_function<_A1, _A2, _Rp> 90 __test(const volatile binary_function<_A1, _A2, _Rp>*); 91public: 92 static const bool value = !is_same<decltype(__test((_Tp*)0)), __two>::value; 93 typedef decltype(__test((_Tp*)0)) type; 94}; --- 343 unchanged lines hidden --- |