Skip to content

Commit cf42e26

Browse files
committed
update amalgamated file
1 parent 3bfc9c6 commit cf42e26

File tree

1 file changed

+29
-21
lines changed

1 file changed

+29
-21
lines changed

extras/rapidfuzz_amalgamated.hpp

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
22
// SPDX-License-Identifier: MIT
33
// RapidFuzz v1.0.2
4-
// Generated: 2024-12-25 11:44:52.213162
4+
// Generated: 2025-02-11 13:40:17.377263
55
// ----------------------------------------------------------
66
// This file is an amalgamation of multiple different files.
77
// You probably shouldn't edit it directly.
@@ -429,6 +429,17 @@ struct ShiftedBitMatrix {
429429

430430
#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
431431
# define RAPIDFUZZ_DEDUCTION_GUIDES
432+
#endif
433+
434+
/* older versions of msvc have bugs in their if constexpr support
435+
* see https://github.com/rapidfuzz/rapidfuzz-cpp/issues/122
436+
* since we don't know the exact version this was fixed in, use the earliest we could test
437+
*/
438+
#if defined(_MSC_VER) && _MSC_VER < 1920
439+
# define RAPIDFUZZ_IF_CONSTEXPR_AVAILABLE 0
440+
# define RAPIDFUZZ_IF_CONSTEXPR if
441+
#elif ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
442+
# define RAPIDFUZZ_DEDUCTION_GUIDES
432443
# define RAPIDFUZZ_IF_CONSTEXPR_AVAILABLE 1
433444
# define RAPIDFUZZ_IF_CONSTEXPR if constexpr
434445
#else
@@ -439,7 +450,7 @@ struct ShiftedBitMatrix {
439450
#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201402L) || __cplusplus >= 201402L)
440451
# define RAPIDFUZZ_CONSTEXPR_CXX14 constexpr
441452
#else
442-
# define RAPIDFUZZ_CONSTEXPR_CXX14
453+
# define RAPIDFUZZ_CONSTEXPR_CXX14 inline
443454
#endif
444455

445456
#include <stddef.h>
@@ -4638,8 +4649,8 @@ void lcs_simd(Range<size_t*> scores, const BlockPatternMatchVector& block, const
46384649
#endif
46394650

46404651
template <size_t N, bool RecordMatrix, typename PMV, typename InputIt1, typename InputIt2>
4641-
auto lcs_unroll(const PMV& block, const Range<InputIt1>&, const Range<InputIt2>& s2,
4642-
size_t score_cutoff = 0) -> LCSseqResult<RecordMatrix>
4652+
auto lcs_unroll(const PMV& block, const Range<InputIt1>&, const Range<InputIt2>& s2, size_t score_cutoff = 0)
4653+
-> LCSseqResult<RecordMatrix>
46434654
{
46444655
uint64_t S[N];
46454656
unroll<size_t, N>([&](size_t i) { S[i] = ~UINT64_C(0); });
@@ -6838,12 +6849,12 @@ struct CachedJaroWinkler : public detail::CachedSimilarityBase<CachedJaroWinkler
68386849

68396850
#ifdef RAPIDFUZZ_DEDUCTION_GUIDES
68406851
template <typename Sentence1>
6841-
explicit CachedJaroWinkler(const Sentence1& s1_,
6842-
double _prefix_weight = 0.1) -> CachedJaroWinkler<char_type<Sentence1>>;
6852+
explicit CachedJaroWinkler(const Sentence1& s1_, double _prefix_weight = 0.1)
6853+
-> CachedJaroWinkler<char_type<Sentence1>>;
68436854

68446855
template <typename InputIt1>
6845-
CachedJaroWinkler(InputIt1 first1, InputIt1 last1,
6846-
double _prefix_weight = 0.1) -> CachedJaroWinkler<iter_value_t<InputIt1>>;
6856+
CachedJaroWinkler(InputIt1 first1, InputIt1 last1, double _prefix_weight = 0.1)
6857+
-> CachedJaroWinkler<iter_value_t<InputIt1>>;
68476858
#endif
68486859

68496860
} // namespace rapidfuzz
@@ -7346,8 +7357,8 @@ size_t levenshtein_hyrroe2003_small_band(const BlockPatternMatchVector& PM, cons
73467357
}
73477358

73487359
template <bool RecordMatrix, typename InputIt1, typename InputIt2>
7349-
auto levenshtein_hyrroe2003_small_band(const Range<InputIt1>& s1, const Range<InputIt2>& s2,
7350-
size_t max) -> LevenshteinResult<RecordMatrix, false>
7360+
auto levenshtein_hyrroe2003_small_band(const Range<InputIt1>& s1, const Range<InputIt2>& s2, size_t max)
7361+
-> LevenshteinResult<RecordMatrix, false>
73517362
{
73527363
assert(max <= s1.size());
73537364
assert(max <= s2.size());
@@ -8014,9 +8025,6 @@ HirschbergPos find_hirschberg_pos(const Range<InputIt1>& s1, const Range<InputIt
80148025
}
80158026
}
80168027

8017-
assert(hpos.left_score >= 0);
8018-
assert(hpos.right_score >= 0);
8019-
80208028
if (hpos.left_score + hpos.right_score > max)
80218029
return find_hirschberg_pos(s1, s2, max * 2);
80228030
else {
@@ -8580,12 +8588,12 @@ struct CachedLevenshtein : public detail::CachedDistanceBase<CachedLevenshtein<C
85808588

85818589
#ifdef RAPIDFUZZ_DEDUCTION_GUIDES
85828590
template <typename Sentence1>
8583-
explicit CachedLevenshtein(const Sentence1& s1_, LevenshteinWeightTable aWeights = {
8584-
1, 1, 1}) -> CachedLevenshtein<char_type<Sentence1>>;
8591+
explicit CachedLevenshtein(const Sentence1& s1_, LevenshteinWeightTable aWeights = {1, 1, 1})
8592+
-> CachedLevenshtein<char_type<Sentence1>>;
85858593

85868594
template <typename InputIt1>
8587-
CachedLevenshtein(InputIt1 first1, InputIt1 last1,
8588-
LevenshteinWeightTable aWeights = {1, 1, 1}) -> CachedLevenshtein<iter_value_t<InputIt1>>;
8595+
CachedLevenshtein(InputIt1 first1, InputIt1 last1, LevenshteinWeightTable aWeights = {1, 1, 1})
8596+
-> CachedLevenshtein<iter_value_t<InputIt1>>;
85898597
#endif
85908598

85918599
} // namespace rapidfuzz
@@ -9961,8 +9969,8 @@ explicit CachedPartialTokenSortRatio(const Sentence1& s1)
99619969
-> CachedPartialTokenSortRatio<char_type<Sentence1>>;
99629970

99639971
template <typename InputIt1>
9964-
CachedPartialTokenSortRatio(InputIt1 first1,
9965-
InputIt1 last1) -> CachedPartialTokenSortRatio<iter_value_t<InputIt1>>;
9972+
CachedPartialTokenSortRatio(InputIt1 first1, InputIt1 last1)
9973+
-> CachedPartialTokenSortRatio<iter_value_t<InputIt1>>;
99669974
#endif
99679975

99689976
/**
@@ -10089,8 +10097,8 @@ template <typename Sentence1>
1008910097
explicit CachedPartialTokenSetRatio(const Sentence1& s1) -> CachedPartialTokenSetRatio<char_type<Sentence1>>;
1009010098

1009110099
template <typename InputIt1>
10092-
CachedPartialTokenSetRatio(InputIt1 first1,
10093-
InputIt1 last1) -> CachedPartialTokenSetRatio<iter_value_t<InputIt1>>;
10100+
CachedPartialTokenSetRatio(InputIt1 first1, InputIt1 last1)
10101+
-> CachedPartialTokenSetRatio<iter_value_t<InputIt1>>;
1009410102
#endif
1009510103

1009610104
/**

0 commit comments

Comments
 (0)