From 53105890d75789c81adbb3d781eff9ebd7110222 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 1 Sep 2017 17:33:44 +0200 Subject: Add support for try_match(), use to handle deleted headers --- build2/depdb.hxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'build2/depdb.hxx') diff --git a/build2/depdb.hxx b/build2/depdb.hxx index da45a4a..520642e 100644 --- a/build2/depdb.hxx +++ b/build2/depdb.hxx @@ -144,6 +144,11 @@ namespace build2 void write (char, bool nl = true); + // Mark the previously read line as to be overwritte. + // + void + write () {if (state_ != state::write) change ();} + // Read the next line and compare it to the expected value. If it matches, // return NULL. Otherwise, overwrite it and return the old value (which // could also be NULL). This strange-sounding result semantics is used to -- cgit v1.1