From 71d5df6158e9bfc284d24eb9f23b68fa1665d1e2 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 8 Nov 2026 14:24:02 -0600 Subject: [PATCH] [subset] Fix build after standard trait migration (#6599) 978afca2a removed hb_integral_constant, but four subset table-cache tag-dispatch sites still used it. Both ordinary and amalgamated builds fail as a result. Use std::integral_constant at all four sites to complete the migration and preserve the existing tag dispatch. Validation: full Meson build and suite (298 passed, 1 skipped); GCC and Clang C++11 world amalgamation builds with -Werror; GCC C++11 HB_TINY core and subset compilation checks. Fixes: 978afca2a ([meta] Use C++11 standard traits and numeric limits) Assisted-by: Codex --- src/hb-subset-plan.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hb-subset-plan.hh b/src/hb-subset-plan.hh index d4ec9b566..bb7c95275 100644 --- a/src/hb-subset-plan.hh +++ b/src/hb-subset-plan.hh @@ -40,7 +40,7 @@ /* Accelerators opt in only when they can provide full sanitization. */ template static hb_blob_t * -_hb_subset_get_face_table (Face *, hb_integral_constant, hb_priority<0>) { return nullptr; } +_hb_subset_get_face_table (Face *, std::integral_constant, hb_priority<0>) { return nullptr; } /* Allow an accelerator to handle initialization inside libharfbuzz. */ template @@ -56,12 +56,12 @@ HB_AUTO_RETURN (loader->borrow_sanitized_table ()) #define HB_OT_TABLE(Namespace, Type) \ template \ static auto _hb_subset_get_face_table (Face *face, \ - hb_integral_constanttable.Type.get ())>::tableTag>, hb_priority<1>) \ + std::integral_constanttable.Type.get ())>::tableTag>, hb_priority<1>) \ HB_AUTO_RETURN (face->table.Type.get_blob ()) #define HB_OT_ACCELERATOR(Namespace, Type) \ template \ static auto _hb_subset_get_face_table (Face *face, \ - hb_integral_constant (face, face->table.Type, hb_prioritize))::T::tableTag>, hb_priority<1>) \ + std::integral_constant (face, face->table.Type, hb_prioritize))::T::tableTag>, hb_priority<1>) \ HB_AUTO_RETURN (_hb_subset_borrow_sanitized_table (face, face->table.Type, hb_prioritize).get_blob ()) #include "hb-ot-face-table-list.hh" #undef HB_OT_ACCELERATOR @@ -224,7 +224,7 @@ struct hb_subset_plan_t { hb_blob_ptr_t operator () (hb_subset_plan_t *plan) { - if (hb_blob_t *blob = _hb_subset_get_face_table (plan->source, hb_integral_constant {}, hb_prioritize)) + if (hb_blob_t *blob = _hb_subset_get_face_table (plan->source, std::integral_constant {}, hb_prioritize)) return blob; hb_lock_t lock (plan->accelerator ? &plan->accelerator->sanitized_table_cache_lock : nullptr);