Bug 20646 – [Module std.container.rbtree] inadequate documentation

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-03-07T15:38:48Z
Last change time
2024-12-01T16:36:27Z
Assigned to
No Owner
Creator
[email protected]
Moved to GitHub: phobos#10409 →

Comments

Comment #0 by mark — 2020-03-07T15:38:48Z
Every one of the examples shown at the top of the page uses the redBlackTree function which takes a sequence of items. There isn't a single example that begins with an empty tree or that uses new. Yet, because RedBlackTree is a class, you _must_ use new to create a new empty tree. I think there should be at least one example showing how to create an empty tree, and then populate it with some values.
Comment #1 by robert.schadek — 2024-12-01T16:36:27Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10409 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB