[set] Add << overload for range-sink

This commit is contained in:
Behdad Esfahbod 2020-04-23 10:51:12 -07:00
parent a7df5a7bda
commit 689f3f57fa
1 changed files with 4 additions and 1 deletions

View File

@ -450,7 +450,10 @@ struct hb_set_t
bool operator () (hb_codepoint_t k) const { return has (k); }
/* Sink interface. */
hb_set_t& operator << (hb_codepoint_t v) { add (v); return *this; }
hb_set_t& operator << (hb_codepoint_t v)
{ add (v); return *this; }
hb_set_t& operator << (const hb_pair_t<hb_codepoint_t, hb_codepoint_t>& range)
{ add_range (range.first, range.second); return *this; }
bool intersects (hb_codepoint_t first, hb_codepoint_t last) const
{