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

namespace build2
{
  namespace test
  {
    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;}
      }
    }
  }
}