Changeset 999

Show
Ignore:
Timestamp:
04/01/09 01:33:16 (3 years ago)
Author:
walter
Message:

update docs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/docsrc/changelog.dd

    r988 r999  
    4242) 
    4343 
    44 $(VERSION 027, Mar 29, 2009, =================================================, 
     44$(VERSION 027, Mar 31, 2009, =================================================, 
    4545 
    4646    $(WHATSNEW 
    4747    $(LI Most functions in std.math are now pure nothrow. Improved speed of std.math.hypot.) 
    4848    $(LI Added response files for Linux and OSX) 
    49     $(LI Added $(B alias this)) 
     49    $(LI Added $(LINK2 class.html#AliasThis, $(B alias this))) 
    5050    $(LI $(BUGZILLA 2746): Make float.init signalling NaN by default) 
    5151    $(LI On Windows, if there are multiple source files on the command 
     
    5353     compilation.) 
    5454    $(LI Folded in patches for LDC compatibility from Tomas Lindquist Olsen) 
     55    $(LI Removed $(B etc.gamma) from the library.) 
    5556    ) 
    5657    $(BUGSFIXED 
     
    5960    $(LI $(BUGZILLA 920): Fix one more out of date reference to 'auto' rather than 'scope') 
    6061    $(LI $(BUGZILLA 1645): can override base class' const method with non-const method) 
     62    $(LI $(BUGZILLA 2319): "Win32 Exception" not very useful) 
     63    $(LI $(BUGZILLA 2336): link to nonexistent std_array.html) 
    6164    $(LI $(BUGZILLA 2570): Patch for some mistakes in Ddoc comments) 
     65    $(LI $(BUGZILLA 2574): std.c.stdio doesn't compile: va_list not defined!) 
     66    $(LI $(BUGZILLA 2591): custom allocator new argument should be size_t instead of uint) 
    6267    $(LI $(BUGZILLA 2595): template ctors crash compiler) 
    6368    $(LI $(BUGZILLA 2596): Variadic constructors don't compile) 
    6469    $(LI $(BUGZILLA 2626): template function not working against template struct instantiated with default arguments) 
    6570    $(LI $(BUGZILLA 2674): Copy postblit constructor this(this) not called for members) 
     71    $(LI $(BUGZILLA 2689): seek behaves incorrectly on MAC OSX) 
    6672    $(LI $(BUGZILLA 2692): alignment of double on x86 linux is incorrect) 
    6773    $(LI $(BUGZILLA 2700): typeof tests stops compilation abruptly) 
     
    7884    $(LI $(BUGZILLA 2731): Errors in associative array example) 
    7985    $(LI $(BUGZILLA 2739): _argptr is invalid for functions nested in class methods) 
     86    $(LI $(BUGZILLA 2743): dumpobj gives "buss error" on Tiger) 
    8087    $(LI $(BUGZILLA 2744): wrong init tocbuffer of forstatement) 
    8188    $(LI $(BUGZILLA 2745): missing token tochars in lexer.c) 
     
    8390    $(LI $(BUGZILLA 2750): Optimize slice copy with size known at compile time) 
    8491    $(LI $(BUGZILLA 2751): incorrect scope storage class vardeclaration tocbuffer) 
     92    $(LI $(BUGZILLA 2752): std.xml does not encode CData correctly) 
    8593    $(LI $(BUGZILLA 2754): The error message regarding implicit conversion to shared doesn't mention shared in the message.) 
    8694    $(LI $(BUGZILLA 2755): ICE on invalid ref returns in linked objects: Assertion failure: 'type' on line 6566 in file 'expression.c'. No ICE or error if invalid code is local to the file.) 
     
    9098    $(LI $(BUGZILLA 2766): DMD hangs with 0%cpu) 
    9199    $(LI $(BUGZILLA 2767): DMD incorrectly mangles NTFS stream names) 
     100    $(LI $(BUGZILLA 2772): lib can't open response file) 
    92101    ) 
    93102) 
  • trunk/docsrc/class.dd

    r833 r999  
    9292        $(LI $(LINK2 #allocators, Class Allocators)) 
    9393        $(LI $(LINK2 #deallocators, Class Deallocators)) 
     94$(V2 
     95        $(LI $(LINK2 #AliasThis, Alias This))) 
    9496    ) 
    9597    ) 
     
    848850    ) 
    849851 
     852$(V2 
     853<h3>$(LNAME2 AliasThis, Alias This)</h3> 
     854 
     855$(GRAMMAR 
     856$(GNAME AliasThis): 
     857    $(B alias) $(I Identifier) $(B this;) 
     858) 
     859 
     860    $(P An $(I AliasThis) declaration names another class or struct member 
     861    to which any undefined lookups will be forwarded. 
     862    The $(I Identifier) names that member. 
     863    ) 
     864 
     865    $(P A class or struct can be implicitly converted to the $(I AliasThis) 
     866    member. 
     867    ) 
     868 
     869    $(P There is only one $(I AliasThis) allowed per class or struct. 
     870    ) 
     871 
     872--- 
     873struct S 
     874{   int x; 
     875    alias x this; 
     876} 
     877 
     878int foo(int i) { return i * 2; } 
     879 
     880void test() 
     881{ 
     882    S s; 
     883    s.x = 7; 
     884    int i = -s;   // i == -7 
     885    i = s + 8;    // i == 15 
     886    i = s + s;    // i == 14 
     887    i = 9 + s;    // i == 16 
     888    i = foo(s);   // implicit conversion to int 
     889} 
     890--- 
     891) 
     892 
    850893<h3>$(LNAME2 auto, Scope Classes)</h3> 
    851894 
  • trunk/docsrc/struct.dd

    r989 r999  
    363363    $(GLINK StructPostblit) 
    364364    $(GLINK StructDestructor)) 
     365$(V2 
     366    $(LINK2 class.html#AliasThis, $(I AliasThis)) 
     367) 
    365368 
    366369$(GNAME StructAllocator):