From 495de53eb379eff3cf998b210f7472619741e037 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 17 Nov 2023 07:30:37 +0200 Subject: Add pre-condition assert to target::newer() --- libbuild2/target.ixx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libbuild2/target.ixx') diff --git a/libbuild2/target.ixx b/libbuild2/target.ixx index 69b2776..39b81e7 100644 --- a/libbuild2/target.ixx +++ b/libbuild2/target.ixx @@ -769,6 +769,8 @@ namespace build2 inline bool mtime_target:: newer (timestamp mt, target_state s) const { + assert (s != target_state::unknown); // Should be executed. + timestamp mp (mtime ()); // What do we do if timestamps are equal? This can happen, for example, -- cgit v1.1