diff options
Diffstat (limited to 'build2/variable')
-rw-r--r-- | build2/variable | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/build2/variable b/build2/variable index f3fc0dd..9888aa0 100644 --- a/build2/variable +++ b/build2/variable @@ -720,8 +720,16 @@ namespace build2 { iterator_adapter () = default; iterator_adapter (const I& i): I (i) {} + + // Automatically type a newly typed value on access. + // typename I::reference operator* () const; typename I::pointer operator-> () const; + + // Untyped access. + // + uint16_t extra () const {return I::operator* ().second.extra;} + typename I::reference untyped () const {return I::operator* ();} }; using const_iterator = iterator_adapter<map_type::const_iterator>; |