From: Behdad Esfahbod Date: Sun, 31 Mar 2019 01:19:36 +0000 (-0700) Subject: [meta] Add hb_move and hb_forward ala std:: X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7c9ceabcef426ca6fc54b70db9dd8cb63937710b;p=platform%2Fupstream%2FlibHarfBuzzSharp.git [meta] Add hb_move and hb_forward ala std:: --- diff --git a/src/hb-meta.hh b/src/hb-meta.hh index a303c67..63c8a8c 100644 --- a/src/hb-meta.hh +++ b/src/hb-meta.hh @@ -72,6 +72,17 @@ static const struct } hb_deref_pointer HB_UNUSED; +/* std::move and std::forward */ + +template +hb_remove_reference (T)&& hb_move (T&& t) { return (hb_remove_reference (T)&&) (t); } + +template +T&& hb_forward (hb_remove_reference (T)& t) { return (T&&) t; } +template +T&& hb_forward (hb_remove_reference (T)&& t) { return (T&&) t; } + + /* Void! For when we need a expression-type of void. */ struct hb_void_t { typedef void value; };