aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/variable.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-02-20 08:57:32 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-02-20 16:01:40 +0200
commitc2d2a1ac0ac41a068c4bf09f8236a61d576e74f5 (patch)
tree32fe50dc4f95772493f4242ce40fb0afd01c0bb6 /libbuild2/variable.cxx
parent88640e677fa0695783eac68014d7d8d5bc42d117 (diff)
Add custom subscript, iterate functions for vector and set value types
Diffstat (limited to 'libbuild2/variable.cxx')
-rw-r--r--libbuild2/variable.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/libbuild2/variable.cxx b/libbuild2/variable.cxx
index 6f9f0fb..4a08b4d 100644
--- a/libbuild2/variable.cxx
+++ b/libbuild2/variable.cxx
@@ -2093,8 +2093,9 @@ namespace build2
return r;
}
- void json_iterate (const value& val,
- const function<void (value&&, bool first)>& f)
+ static void
+ json_iterate (const value& val,
+ const function<void (value&&, bool first)>& f)
{
// Implement in terms of subscript for consistency (in particular,
// iterating over simple values like number, string).