diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-08-11 13:17:48 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-08-11 13:17:48 +0200 |
commit | 94c1bdfc898e4cad2577949345adb3e2373c692b (patch) | |
tree | cb146cab8f622c9f37f60433a8d5c0df18203042 /libbuild2/utility.hxx | |
parent | c55c3335c5e86777137c8dcca504af9c1d2cadf1 (diff) |
Review find_option*() iterator version
Diffstat (limited to 'libbuild2/utility.hxx')
-rw-r--r-- | libbuild2/utility.hxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libbuild2/utility.hxx b/libbuild2/utility.hxx index 67c46d9..b747667 100644 --- a/libbuild2/utility.hxx +++ b/libbuild2/utility.hxx @@ -633,7 +633,8 @@ namespace build2 F&& get = [] (const string& s) {return s;}); // Check if a specified option is present in the variable or value. T is - // either target or scope. + // either target or scope. For the interator version use rbegin()/rend() to + // search backwards. // template <typename T> bool @@ -695,8 +696,9 @@ namespace build2 // As above but look for an option that has the specified prefix. Return the // pointer to option or NULL if not found (thus can be used as bool). - // Search backward (which is normall consistent with how options override - // each other). + // Search backward (which is normally consistent with how options override + // each other). For the interator version use rbegin()/rend() to do the + // same. // template <typename T> const string* @@ -708,7 +710,7 @@ namespace build2 template <typename I> I - find_option_prefix (const char* prefix, I rbegin, I rend, bool ignore_case = false); + find_option_prefix (const char* prefix, I begin, I end, bool = false); LIBBUILD2_SYMEXPORT const string* find_option_prefix (const char* prefix, const lookup&, bool = false); |