diff options
Diffstat (limited to 'libbuild2/target.hxx')
-rw-r--r-- | libbuild2/target.hxx | 4 |
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> |