aboutsummaryrefslogtreecommitdiff
path: root/libbutl/b.ixx
blob: 1667101abc757e7b8ed0af12f741542a8b1a0bdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// file      : libbutl/b.ixx -*- C++ -*-
// license   : MIT; see accompanying LICENSE file

namespace butl
{
  // b_info_flags
  //
  inline b_info_flags operator& (b_info_flags x, b_info_flags y)
  {
    return x &= y;
  }

  inline b_info_flags operator| (b_info_flags x, b_info_flags y)
  {
    return x |= y;
  }

  inline b_info_flags operator&= (b_info_flags& x, b_info_flags y)
  {
    return x = static_cast<b_info_flags> (
      static_cast<std::uint16_t> (x) &
      static_cast<std::uint16_t> (y));
  }

  inline b_info_flags operator|= (b_info_flags& x, b_info_flags y)
  {
    return x = static_cast<b_info_flags> (
      static_cast<std::uint16_t> (x) |
      static_cast<std::uint16_t> (y));
  }
}