Compare commits

...

5 Commits

Author SHA1 Message Date
Peter Dimov b2cb43dca0 Fix typo in README.md 2026-04-01 21:54:13 +03:00
Peter Dimov 828a53d8a4 Fix typo in intro.adoc 2026-04-01 19:58:55 +03:00
Peter Dimov 060d4aea6b Change sprintf to snprintf in benchmarks. Fixes #41. 2025-08-21 19:31:51 +03:00
Peter Dimov 186c38e255 Add benchmark/Jamfile 2025-08-21 19:26:00 +03:00
Peter Dimov c8dab7f85a Remove windows-2019 from GHA 2025-08-21 18:22:07 +03:00
6 changed files with 24 additions and 14 deletions
-8
View File
@@ -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
+1 -1
View File
@@ -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)
+18
View File
@@ -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 ;
+2 -2
View File
@@ -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 );
+2 -2
View File
@@ -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
View File
@@ -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.