From 1bb564a690e2661094e9071d4003638390a5a6fe Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 5 Feb 2018 12:02:32 +0200 Subject: Fix test and install rules to handle see-through groups correctly --- build2/target.hxx | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'build2/target.hxx') diff --git a/build2/target.hxx b/build2/target.hxx index 105cc4b..5c8e7bd 100644 --- a/build2/target.hxx +++ b/build2/target.hxx @@ -697,8 +697,6 @@ namespace build2 // also be traversed in reverse, but that's what you usually want, // anyway. // - // For constant iteration use const_group_prerequisites(). - // class group_prerequisites { public: @@ -1015,6 +1013,24 @@ namespace build2 bool enter_group (); + // Return true if the next element is this group's members. Normally + // used to iterate over group members only, for example: + // + // for (...; ++i) + // { + // if (i->prerequisite.type.see_through) + // { + // for (i.enter_group (); i.group (); ) + // { + // ++i; + // ... + // } + // } + // } + // + bool + group () const; + value_type operator* () const { const target* t (k_ != nullptr ? k_: -- cgit v1.1