summaryrefslogtreecommitdiff
path: root/thirdparty/harfbuzz/src/hb-map.hh
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-12-02 09:35:45 +0100
committerGitHub <noreply@github.com>2021-12-02 09:35:45 +0100
commit256406a0bcd57e1331cb7c680bd4692ed0e0d5f5 (patch)
treedc7f3ddcb8850aa468fabb744fd0c5673463fc54 /thirdparty/harfbuzz/src/hb-map.hh
parent8e090e2b9c9d363ccca8ecbc259e03350d4b6f21 (diff)
parent371010c5f95ff13132821d707468d457dbaea7a7 (diff)
Merge pull request #55505 from bruvzg/hb_312
Diffstat (limited to 'thirdparty/harfbuzz/src/hb-map.hh')
-rw-r--r--thirdparty/harfbuzz/src/hb-map.hh22
1 files changed, 15 insertions, 7 deletions
diff --git a/thirdparty/harfbuzz/src/hb-map.hh b/thirdparty/harfbuzz/src/hb-map.hh
index bb4a0eb5d1..793dcf22ca 100644
--- a/thirdparty/harfbuzz/src/hb-map.hh
+++ b/thirdparty/harfbuzz/src/hb-map.hh
@@ -35,8 +35,10 @@
*/
template <typename K, typename V,
- K kINVALID = hb_is_pointer (K) ? 0 : std::is_signed<K>::value ? hb_int_min (K) : (K) -1,
- V vINVALID = hb_is_pointer (V) ? 0 : std::is_signed<V>::value ? hb_int_min (V) : (V) -1>
+ typename k_invalid_t = K,
+ typename v_invalid_t = V,
+ k_invalid_t kINVALID = hb_is_pointer (K) ? 0 : std::is_signed<K>::value ? hb_int_min (K) : (K) -1,
+ v_invalid_t vINVALID = hb_is_pointer (V) ? 0 : std::is_signed<V>::value ? hb_int_min (V) : (V) -1>
struct hb_hashmap_t
{
static constexpr K INVALID_KEY = kINVALID;
@@ -62,8 +64,10 @@ struct hb_hashmap_t
hb_copy (o, *this);
}
- static_assert (std::is_integral<K>::value || hb_is_pointer (K), "");
- static_assert (std::is_integral<V>::value || hb_is_pointer (V), "");
+ static_assert (std::is_trivially_copyable<K>::value, "");
+ static_assert (std::is_trivially_copyable<V>::value, "");
+ static_assert (std::is_trivially_destructible<K>::value, "");
+ static_assert (std::is_trivially_destructible<V>::value, "");
struct item_t
{
@@ -348,19 +352,23 @@ struct hb_hashmap_t
struct hb_map_t : hb_hashmap_t<hb_codepoint_t,
hb_codepoint_t,
+ hb_codepoint_t,
+ hb_codepoint_t,
HB_MAP_VALUE_INVALID,
HB_MAP_VALUE_INVALID>
{
using hashmap = hb_hashmap_t<hb_codepoint_t,
hb_codepoint_t,
+ hb_codepoint_t,
+ hb_codepoint_t,
HB_MAP_VALUE_INVALID,
HB_MAP_VALUE_INVALID>;
hb_map_t () = default;
~hb_map_t () = default;
- hb_map_t (hb_map_t& o) = default;
- hb_map_t& operator= (const hb_map_t& other) = default;
- hb_map_t& operator= (hb_map_t&& other) = default;
+ hb_map_t (hb_map_t&) = default;
+ hb_map_t& operator= (const hb_map_t&) = default;
+ hb_map_t& operator= (hb_map_t&&) = default;
hb_map_t (std::initializer_list<hb_pair_t<hb_codepoint_t, hb_codepoint_t>> lst) : hashmap (lst) {}
template <typename Iterable,
hb_requires (hb_is_iterable (Iterable))>