aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/script/regex.ixx
blob: e72b5783ca824b09aa3daed5a207b32492f1f15a (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      : libbuild2/script/regex.ixx -*- C++ -*-
// license   : MIT; see accompanying LICENSE file

namespace build2
{
  namespace script
  {
    namespace regex
    {
      inline char_flags
      operator&= (char_flags& x, char_flags y)
      {
        return x = static_cast<char_flags> (
          static_cast<uint16_t> (x) & static_cast<uint16_t> (y));
      }

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

      inline char_flags
      operator& (char_flags x, char_flags y) {return x &= y;}

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