www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20646] New: [Module std.container.rbtree] inadequate

https://issues.dlang.org/show_bug.cgi?id=20646

          Issue ID: 20646
           Summary: [Module std.container.rbtree] inadequate documentation
           Product: D
           Version: D2
          Hardware: All
               URL: http://dlang.org/library/std/container/rbtree.html
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: mark qtrac.eu

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.

--
Mar 07 2020