mirror of
https://github.com/boostorg/container_hash.git
synced 2026-05-27 19:14:53 +02:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b2cb43dca0 | |||
| 828a53d8a4 | |||
| 060d4aea6b | |||
| 186c38e255 | |||
| c8dab7f85a |
@@ -277,14 +277,6 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- toolset: msvc-14.0
|
||||
cxxstd: 14,latest
|
||||
addrmd: 32,64
|
||||
os: windows-2019
|
||||
- toolset: msvc-14.2
|
||||
cxxstd: "14,17,20,latest"
|
||||
addrmd: 32,64
|
||||
os: windows-2019
|
||||
- toolset: msvc-14.3
|
||||
cxxstd: "14,17,20,latest"
|
||||
addrmd: 32,64
|
||||
|
||||
@@ -8,7 +8,7 @@ by C++11 as `std::hash`, and several support facilities (`hash_combine`,
|
||||
|
||||
`boost::hash` supports most standard types and some user-defined types out of
|
||||
the box, and is extensible; it's possible for a user-defined type `X` to make
|
||||
iself hashable via `boost::hash<X>` by defining an appropriate overload of the
|
||||
itself hashable via `boost::hash<X>` by defining an appropriate overload of the
|
||||
function `hash_value`.
|
||||
|
||||
See [the documentation of the library](https://www.boost.org/libs/container_hash)
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
# Copyright Daniel James 2005. Use, modification, and distribution are
|
||||
# subject to the Boost Software License, Version 1.0. (See accompanying
|
||||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
import testing ;
|
||||
|
||||
project :
|
||||
requirements
|
||||
<library>/boost/container_hash//boost_container_hash
|
||||
<library>/boost/core//boost_core
|
||||
<library>/boost/unordered//boost_unordered
|
||||
;
|
||||
|
||||
link char_seq.cpp ;
|
||||
link unordered.cpp ;
|
||||
link unordered_flat.cpp : <cxxstd>11:<build>no <cxxstd>14:<build>no ;
|
||||
link word_count.cpp : <cxxstd>11:<build>no <cxxstd>14:<build>no ;
|
||||
@@ -79,11 +79,11 @@ int main()
|
||||
|
||||
if( k & 1 )
|
||||
{
|
||||
sprintf( buffer, "prefix_%llu_suffix", k );
|
||||
std::snprintf( buffer, sizeof( buffer ), "prefix_%llu_suffix", k );
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( buffer, "{%u}", static_cast<unsigned>( k ) );
|
||||
std::snprintf( buffer, sizeof( buffer ), "{%u}", static_cast<unsigned>( k ) );
|
||||
}
|
||||
|
||||
v.push_back( buffer );
|
||||
|
||||
@@ -356,11 +356,11 @@ int main()
|
||||
|
||||
if( k & 1 )
|
||||
{
|
||||
sprintf( buffer, "prefix_%llu_suffix", k );
|
||||
std::snprintf( buffer, sizeof( buffer ), "prefix_%llu_suffix", k );
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( buffer, "{%u}", static_cast<unsigned>( k ) );
|
||||
std::snprintf( buffer, sizeof( buffer ), "{%u}", static_cast<unsigned>( k ) );
|
||||
}
|
||||
|
||||
v.push_back( buffer );
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ Out of the box, `boost::hash` supports
|
||||
* `std::variant`, `std::monostate`.
|
||||
|
||||
`boost::hash` is extensible; it's possible for a user-defined type `X` to make
|
||||
iself hashable via `boost::hash<X>` by defining an appropriate overload of the
|
||||
itself hashable via `boost::hash<X>` by defining an appropriate overload of the
|
||||
function `hash_value`. Many, if not most, Boost types already contain the
|
||||
necessary support.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user