aboutsummaryrefslogtreecommitdiff
path: root/build2/test/script/regex.ixx
blob: a83f58f7472b739bb9acc31f8da8914e743cbd75 (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
35
// file      : build2/test/script/regex.ixx -*- C++ -*-
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// 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;}
      }
    }
  }
}