aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/target.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-08-26 10:02:18 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-08-26 10:02:18 +0200
commit08de44303033cc5ad966f4e75a7fa4a3cb06635f (patch)
tree090b21375b91a6b7999813d17469d20d58ab6060 /libbuild2/target.hxx
parent97e00dccb4a9d3abc3c896b33560ed6aed0a1763 (diff)
Implement updating build system modules
Diffstat (limited to 'libbuild2/target.hxx')
-rw-r--r--libbuild2/target.hxx4
1 files changed, 4 insertions, 0 deletions
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<const T*> (this);}
+ const target*
+ is_a (const char* n) const {
+ return type ().is_a (n) ? this : nullptr;}
+
// Unchecked cast.
//
template <typename T>