Skip to content

Commit 0fd2bde

Browse files
author
H. S. Teoh
committed
Point user to std.array.byPair if compatibility with Tuple is desired.
1 parent 71bd729 commit 0fd2bde

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

spec/hash-map.dd

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,11 @@ Properties for associative arrays are:
341341
ForeachStatement) which will iterate over key-value pairs of the
342342
associative array. The returned pairs are represented by an opaque type
343343
with $(D .key) and $(D .value) properties for accessing the key and
344-
value of the pair, respectively.))
344+
value of the pair, respectively. Note that this is a low-level
345+
interface to iterating over the associative array and is not compatible
346+
with the $(LINK2 $(ROOT_DIR)phobos/std_typecons.html#.Tuple,`Tuple`)
347+
type in Phobos. For compatibility with `Tuple`, use
348+
$(LINK2 $(ROOT_DIR)phobos/std_array.html#.byPair,std.array.byPair) instead.))
345349
$(TROW $(D .get(Key key, lazy Value defVal)),
346350
$(ARGS Looks up $(D key); if it exists returns corresponding value
347351
else evaluates and returns $(D defVal).))

0 commit comments

Comments
 (0)