From 08de44303033cc5ad966f4e75a7fa4a3cb06635f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 26 Aug 2019 10:02:18 +0200 Subject: Implement updating build system modules --- libbuild2/target.hxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libbuild2/target.hxx') diff --git a/libbuild2/target.hxx b/libbuild2/target.hxx index b0d46e9..d543da8 100644 --- a/libbuild2/target.hxx +++ b/libbuild2/target.hxx @@ -730,6 +730,10 @@ namespace build2 const T* is_a () const {return dynamic_cast (this);} + const target* + is_a (const char* n) const { + return type ().is_a (n) ? this : nullptr;} + // Unchecked cast. // template -- cgit v1.1