diff options
Diffstat (limited to 'build2/target.hxx')
-rw-r--r-- | build2/target.hxx | 20 |
1 files changed, 18 insertions, 2 deletions
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_: |