From 719556e44c041a1b65b3fd32e7d6d19154b93b9b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 5 Jan 2017 16:43:22 +0200 Subject: Sketch bit stealing interface for regex line_char --- build2/test/script/regex | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'build2') diff --git a/build2/test/script/regex b/build2/test/script/regex index 9a70030..7dacfee 100644 --- a/build2/test/script/regex +++ b/build2/test/script/regex @@ -57,6 +57,26 @@ namespace build2 struct line_char { + /* + private: + size_t data_; + + // Steal two bits from the pointer (need to static assert). + // + public: + line_type + type () const; + + int + special () const; // Stored as (shifted) int16. + + const char_string* + literal () const; + + const char_regex* + regex () const; + */ + line_type type; union -- cgit v1.1