From a699c6b17cf2d272ac445838e82db6b0017cdbd7 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 9 Jan 2019 19:42:41 -0800 Subject: [PATCH] [algs] Add hb_identity --- src/hb-algs.hh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/hb-algs.hh b/src/hb-algs.hh index 1cae346..a61925a 100644 --- a/src/hb-algs.hh +++ b/src/hb-algs.hh @@ -31,9 +31,11 @@ #include "hb-null.hh" -/* - * Pair - */ +static HB_UNUSED struct +{ + template T + operator () (const T& v) const { return v; } +} hb_identity; template struct hb_pair_t -- 2.7.4