From 70af0087d8efb3f2f7dc9ffdf2568419913f16da Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 30 Jun 2015 15:07:03 +0200 Subject: Group "see through" iteration, take 1 --- build/target.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'build/target.cxx') diff --git a/build/target.cxx b/build/target.cxx index 6cd1fc9..ec96779 100644 --- a/build/target.cxx +++ b/build/target.cxx @@ -17,6 +17,18 @@ using namespace std; namespace build { + // target_type + // + bool target_type:: + is_a (const type_index& id) const + { + for (const target_type* p (this); p != nullptr; p = p->base) + if (p->id == id) + return true; + + return false; + } + // target_state // static const char* target_state_[] = { -- cgit v1.1