[bit-set-invertible] Implement standard-5 methods & swap
This commit is contained in:
parent
dcd18da611
commit
11eadb5d28
|
@ -35,10 +35,18 @@
|
|||
struct hb_bit_set_invertible_t
|
||||
{
|
||||
hb_bit_set_t s;
|
||||
bool inverted;
|
||||
bool inverted = false;
|
||||
|
||||
hb_bit_set_invertible_t () { init (); }
|
||||
~hb_bit_set_invertible_t () { fini (); }
|
||||
hb_bit_set_invertible_t () = default;
|
||||
hb_bit_set_invertible_t (hb_bit_set_invertible_t& o) = default;
|
||||
hb_bit_set_invertible_t (hb_bit_set_invertible_t&& o) = default;
|
||||
hb_bit_set_invertible_t& operator= (const hb_bit_set_invertible_t& o) = default;
|
||||
hb_bit_set_invertible_t& operator= (hb_bit_set_invertible_t&& o) = default;
|
||||
friend void swap (hb_bit_set_invertible_t &a, hb_bit_set_invertible_t &b)
|
||||
{
|
||||
hb_swap (a.inverted, b.inverted);
|
||||
hb_swap (a.s, b.s);
|
||||
}
|
||||
|
||||
void init () { s.init (); inverted = false; }
|
||||
void fini () { s.fini (); }
|
||||
|
|
Loading…
Reference in New Issue