aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/utility.hxx
diff options
context:
space:
mode:
authorMatthew Krupcale <mkrupcale@matthewkrupcale.com>2020-08-09 09:37:19 -0400
committerMatthew Krupcale <mkrupcale@matthewkrupcale.com>2020-08-10 15:04:02 -0400
commit1276a28b88295caf27c5df97d2e61b28feed3999 (patch)
treed99cde6956c9c779683db7b49c9987e61d941bdd /libbuild2/utility.hxx
parent18a458e37b454e3d2cd475543d1a60887ddb2e97 (diff)
Add iterator-based versions of find_option{,_prefix}
This allows one to use all of the properties of iterators to manipulate the found option.
Diffstat (limited to 'libbuild2/utility.hxx')
-rw-r--r--libbuild2/utility.hxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/libbuild2/utility.hxx b/libbuild2/utility.hxx
index 7a6ada2..67c46d9 100644
--- a/libbuild2/utility.hxx
+++ b/libbuild2/utility.hxx
@@ -649,6 +649,10 @@ namespace build2
const char* variable,
bool ignore_case = false);
+ template <typename I>
+ I
+ find_option (const char* option, I begin, I end, bool ignore_case = false);
+
LIBBUILD2_SYMEXPORT bool
find_option (const char* option, const lookup&, bool ignore_case = false);
@@ -702,6 +706,10 @@ namespace build2
const string*
find_option_prefix (const char* prefix, T&, const char*, bool = false);
+ template <typename I>
+ I
+ find_option_prefix (const char* prefix, I rbegin, I rend, bool ignore_case = false);
+
LIBBUILD2_SYMEXPORT const string*
find_option_prefix (const char* prefix, const lookup&, bool = false);