Lines Matching defs:std

39 #include <cmath>  // for std::frexp
41 namespace std
45 // Definition of default hash function std::tr1::hash<>. The types for
46 // which std::tr1::hash<T> is defined is in clause 6.3.3. of the PDTR.
53 : public std::unary_function<_Tp, std::size_t> \
55 std::size_t \
57 { return static_cast<std::size_t>(__val); } \
78 : public std::unary_function<_Tp*, std::size_t>
80 std::size_t
82 { return reinterpret_cast<std::size_t>(__p); }
86 // (used by the next specializations of std::tr1::hash<>)
89 template<std::size_t = sizeof(std::size_t)>
92 static std::size_t
93 hash(const char* __first, std::size_t __length)
95 std::size_t __result = 0;
105 static std::size_t
106 hash(const char* __first, std::size_t __length)
108 std::size_t __result = static_cast<std::size_t>(2166136261UL);
111 __result ^= static_cast<std::size_t>(*__first++);
112 __result *= static_cast<std::size_t>(16777619UL);
121 static std::size_t
122 hash(const char* __first, std::size_t __length)
124 std::size_t __result =
125 static_cast<std::size_t>(14695981039346656037ULL);
128 __result ^= static_cast<std::size_t>(*__first++);
129 __result *= static_cast<std::size_t>(1099511628211ULL);
139 struct hash<std::string>
140 : public std::unary_function<std::string, std::size_t>
142 std::size_t
143 operator()(const std::string& __s) const
149 struct hash<std::wstring>
150 : public std::unary_function<std::wstring, std::size_t>
152 std::size_t
153 operator()(const std::wstring& __s) const
163 : public std::unary_function<float, std::size_t>
165 std::size_t
168 std::size_t __result = 0;
180 : public std::unary_function<double, std::size_t>
182 std::size_t
185 std::size_t __result = 0;
199 : public std::unary_function<long double, std::size_t>
201 std::size_t
204 std::size_t __result = 0;
207 __ldval = std::frexp(__ldval, &__exponent);
211 std::numeric_limits<std::size_t>::max() + 1.0l;
216 const std::size_t __hibits = (std::size_t)__ldval;
219 const std::size_t __coeff =
220 (std::numeric_limits<std::size_t>::max()
221 / std::numeric_limits<long double>::max_exponent);
223 __result = __hibits + (std::size_t)__ldval + __coeff * __exponent;