summaryrefslogtreecommitdiff
path: root/include/ext/__hash
diff options
context:
space:
mode:
Diffstat (limited to 'include/ext/__hash')
-rw-r--r--include/ext/__hash34
1 files changed, 16 insertions, 18 deletions
diff --git a/include/ext/__hash b/include/ext/__hash
index 318cb1f97b020..d03f101e95a18 100644
--- a/include/ext/__hash
+++ b/include/ext/__hash
@@ -1,10 +1,9 @@
// -*- C++ -*-
//===------------------------- hash_set ------------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -17,32 +16,31 @@
#include <cstring>
namespace __gnu_cxx {
-using namespace std;
template <typename _Tp> struct _LIBCPP_TEMPLATE_VIS hash { };
template <> struct _LIBCPP_TEMPLATE_VIS hash<const char*>
- : public unary_function<const char*, size_t>
+ : public std::unary_function<const char*, size_t>
{
_LIBCPP_INLINE_VISIBILITY
size_t operator()(const char *__c) const _NOEXCEPT
{
- return __do_string_hash(__c, __c + strlen(__c));
+ return std::__do_string_hash(__c, __c + strlen(__c));
}
};
template <> struct _LIBCPP_TEMPLATE_VIS hash<char *>
- : public unary_function<char*, size_t>
+ : public std::unary_function<char*, size_t>
{
_LIBCPP_INLINE_VISIBILITY
size_t operator()(char *__c) const _NOEXCEPT
{
- return __do_string_hash<const char *>(__c, __c + strlen(__c));
+ return std::__do_string_hash<const char *>(__c, __c + strlen(__c));
}
};
template <> struct _LIBCPP_TEMPLATE_VIS hash<char>
- : public unary_function<char, size_t>
+ : public std::unary_function<char, size_t>
{
_LIBCPP_INLINE_VISIBILITY
size_t operator()(char __c) const _NOEXCEPT
@@ -52,7 +50,7 @@ template <> struct _LIBCPP_TEMPLATE_VIS hash<char>
};
template <> struct _LIBCPP_TEMPLATE_VIS hash<signed char>
- : public unary_function<signed char, size_t>
+ : public std::unary_function<signed char, size_t>
{
_LIBCPP_INLINE_VISIBILITY
size_t operator()(signed char __c) const _NOEXCEPT
@@ -62,7 +60,7 @@ template <> struct _LIBCPP_TEMPLATE_VIS hash<signed char>
};
template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned char>
- : public unary_function<unsigned char, size_t>
+ : public std::unary_function<unsigned char, size_t>
{
_LIBCPP_INLINE_VISIBILITY
size_t operator()(unsigned char __c) const _NOEXCEPT
@@ -72,7 +70,7 @@ template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned char>
};
template <> struct _LIBCPP_TEMPLATE_VIS hash<short>
- : public unary_function<short, size_t>
+ : public std::unary_function<short, size_t>
{
_LIBCPP_INLINE_VISIBILITY
size_t operator()(short __c) const _NOEXCEPT
@@ -82,7 +80,7 @@ template <> struct _LIBCPP_TEMPLATE_VIS hash<short>
};
template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned short>
- : public unary_function<unsigned short, size_t>
+ : public std::unary_function<unsigned short, size_t>
{
_LIBCPP_INLINE_VISIBILITY
size_t operator()(unsigned short __c) const _NOEXCEPT
@@ -92,7 +90,7 @@ template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned short>
};
template <> struct _LIBCPP_TEMPLATE_VIS hash<int>
- : public unary_function<int, size_t>
+ : public std::unary_function<int, size_t>
{
_LIBCPP_INLINE_VISIBILITY
size_t operator()(int __c) const _NOEXCEPT
@@ -102,7 +100,7 @@ template <> struct _LIBCPP_TEMPLATE_VIS hash<int>
};
template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned int>
- : public unary_function<unsigned int, size_t>
+ : public std::unary_function<unsigned int, size_t>
{
_LIBCPP_INLINE_VISIBILITY
size_t operator()(unsigned int __c) const _NOEXCEPT
@@ -112,7 +110,7 @@ template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned int>
};
template <> struct _LIBCPP_TEMPLATE_VIS hash<long>
- : public unary_function<long, size_t>
+ : public std::unary_function<long, size_t>
{
_LIBCPP_INLINE_VISIBILITY
size_t operator()(long __c) const _NOEXCEPT
@@ -122,7 +120,7 @@ template <> struct _LIBCPP_TEMPLATE_VIS hash<long>
};
template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned long>
- : public unary_function<unsigned long, size_t>
+ : public std::unary_function<unsigned long, size_t>
{
_LIBCPP_INLINE_VISIBILITY
size_t operator()(unsigned long __c) const _NOEXCEPT