From b808c255b6a9ddba085bf5646e7d20ec344f2e2d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 28 Apr 2020 08:48:53 +0200 Subject: Initial support for ad hoc recipes (still work in progress) --- libbuild2/script/regex.ixx | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 libbuild2/script/regex.ixx (limited to 'libbuild2/script/regex.ixx') diff --git a/libbuild2/script/regex.ixx b/libbuild2/script/regex.ixx new file mode 100644 index 0000000..e72b578 --- /dev/null +++ b/libbuild2/script/regex.ixx @@ -0,0 +1,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 ( + static_cast (x) & static_cast (y)); + } + + inline char_flags + operator|= (char_flags& x, char_flags y) + { + return x = static_cast ( + static_cast (x) | static_cast (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;} + } + } +} -- cgit v1.1