[Issue 20646] New: [Module std.container.rbtree] inadequate documentation
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sat Mar  7 15:38:48 UTC 2020
    
    
  
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 at puremagic.com
          Reporter: mark at 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.
--
    
    
More information about the Digitalmars-d-bugs
mailing list