head	1.3;
access;
symbols
	RELENG_9_1_0_RELEASE:1.1.2.2
	RELENG_9_1:1.1.2.2.0.2
	RELENG_9_1_BP:1.1.2.2
	RELENG_9:1.1.0.2;
locks; strict;
comment	@# @;


1.3
date	2013.04.28.00.41.54;	author svnexp;	state Exp;
branches;
next	1.2;

1.2
date	2012.11.17.03.36.33;	author svnexp;	state Exp;
branches;
next	1.1;

1.1
date	2011.11.25.20.59.04;	author theraven;	state Exp;
branches
	1.1.2.1;
next	;

1.1.2.1
date	2012.05.22.18.30.14;	author theraven;	state dead;
branches;
next	1.1.2.2;

1.1.2.2
date	2012.05.22.18.30.14;	author theraven;	state Exp;
branches;
next	1.1.2.3;

1.1.2.3
date	2012.11.29.21.29.14;	author svnexp;	state Exp;
branches;
next	1.1.2.4;

1.1.2.4
date	2013.05.11.17.01.44;	author svnexp;	state Exp;
branches;
next	1.1.2.5;

1.1.2.5
date	2014.03.05.20.01.45;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.3
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/249998
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@// -*- 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.
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_EXT_HASH
#define _LIBCPP_EXT_HASH

#pragma GCC system_header

#include <string>
#include <cstring>

namespace __gnu_cxx {
using namespace std;

template <typename T> struct _LIBCPP_TYPE_VIS hash : public std::hash<T>
    { };

template <> struct _LIBCPP_TYPE_VIS hash<const char*>
    : public 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));
    }
};

template <> struct _LIBCPP_TYPE_VIS hash<char *>
    : public 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));
    }
};
}

#endif  // _LIBCPP_EXT_HASH
@


1.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/242945
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242945 | theraven | 2012-11-13 03:27:43 +0000 (Tue, 13 Nov 2012) | 2 lines
## SVN ##
## SVN ## Import new version of libc++ into base.
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d22 1
a22 1
template <typename T> struct _LIBCPP_VISIBLE hash : public std::hash<T>
d25 1
a25 1
template <> struct _LIBCPP_VISIBLE hash<const char*>
d35 1
a35 1
template <> struct _LIBCPP_VISIBLE hash<char *>
@


1.1
log
@SVN rev 227983 on 2011-11-25 20:59:04Z by theraven

Import libc++ / libcxxrt into base.  Not build by default yet (use
MK_LIBCPLUSPLUS=yes to enable).  This is a work-in-progress.  It works for
me, but is not guaranteed to work for anyone else and may eat your dog.

To build C++ using libc++, add -stdlib=libc++ to your CXX and LD flags.

Bug reports welcome, bug fixes even more welcome...

Approved by:	dim (mentor)
@
text
@d46 1
a46 1
#endif _LIBCPP_EXT_HASH
@


1.1.2.1
log
@file __hash was added on branch RELENG_9 on 2012-05-22 18:32:28 +0000
@
text
@d1 46
@


1.1.2.2
log
@SVN rev 235798 on 2012-05-22 18:30:14Z by theraven

Merged libcxxrt and libc++.  Now available for testing on 9-stable with
-stdlib=libc++.  Changes to libstdc++ not yet merged, so it is not yet possible
to mix libstdc++ and libc++ in the same program.

Merged revisions: 226702,226785,227006,227755,227983,227987,228531,228630,228761,229067,230127,232950,233098,234715-234716,234772
@
text
@a0 46
// -*- 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.
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_EXT_HASH
#define _LIBCPP_EXT_HASH

#pragma GCC system_header

#include <string>
#include <cstring>

namespace __gnu_cxx {
using namespace std;

template <typename T> struct _LIBCPP_VISIBLE hash : public std::hash<T>
    { };

template <> struct _LIBCPP_VISIBLE hash<const char*>
    : public 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));
    }
};

template <> struct _LIBCPP_VISIBLE hash<char *>
    : public 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));
    }
};
}

#endif _LIBCPP_EXT_HASH
@


1.1.2.3
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/243683
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r243683 | dim | 2012-11-29 21:26:57 +0000 (Thu, 29 Nov 2012) | 4 lines
## SVN ##
## SVN ## MFC r242945 (by theraven):
## SVN ##
## SVN ##   Import new version of libc++ into base.
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d46 1
a46 1
#endif  // _LIBCPP_EXT_HASH
@


1.1.2.4
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/250514
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d22 1
a22 1
template <typename T> struct _LIBCPP_TYPE_VIS hash : public std::hash<T>
d25 1
a25 1
template <> struct _LIBCPP_TYPE_VIS hash<const char*>
d35 1
a35 1
template <> struct _LIBCPP_TYPE_VIS hash<char *>
@


1.1.2.5
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/262801
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d22 1
a22 1
template <typename _Tp> struct _LIBCPP_TYPE_VIS_ONLY hash : public std::hash<_Tp>
d25 1
a25 1
template <> struct _LIBCPP_TYPE_VIS_ONLY hash<const char*>
d35 1
a35 1
template <> struct _LIBCPP_TYPE_VIS_ONLY hash<char *>
@


