Changeset 999
- Timestamp:
- 04/01/09 01:33:16 (3 years ago)
- Files:
-
- trunk/docsrc/changelog.dd (modified) (6 diffs)
- trunk/docsrc/class.dd (modified) (2 diffs)
- trunk/docsrc/struct.dd (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/docsrc/changelog.dd
r988 r999 42 42 ) 43 43 44 $(VERSION 027, Mar 29, 2009, =================================================,44 $(VERSION 027, Mar 31, 2009, =================================================, 45 45 46 46 $(WHATSNEW 47 47 $(LI Most functions in std.math are now pure nothrow. Improved speed of std.math.hypot.) 48 48 $(LI Added response files for Linux and OSX) 49 $(LI Added $( B alias this))49 $(LI Added $(LINK2 class.html#AliasThis, $(B alias this))) 50 50 $(LI $(BUGZILLA 2746): Make float.init signalling NaN by default) 51 51 $(LI On Windows, if there are multiple source files on the command … … 53 53 compilation.) 54 54 $(LI Folded in patches for LDC compatibility from Tomas Lindquist Olsen) 55 $(LI Removed $(B etc.gamma) from the library.) 55 56 ) 56 57 $(BUGSFIXED … … 59 60 $(LI $(BUGZILLA 920): Fix one more out of date reference to 'auto' rather than 'scope') 60 61 $(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) 61 64 $(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) 62 67 $(LI $(BUGZILLA 2595): template ctors crash compiler) 63 68 $(LI $(BUGZILLA 2596): Variadic constructors don't compile) 64 69 $(LI $(BUGZILLA 2626): template function not working against template struct instantiated with default arguments) 65 70 $(LI $(BUGZILLA 2674): Copy postblit constructor this(this) not called for members) 71 $(LI $(BUGZILLA 2689): seek behaves incorrectly on MAC OSX) 66 72 $(LI $(BUGZILLA 2692): alignment of double on x86 linux is incorrect) 67 73 $(LI $(BUGZILLA 2700): typeof tests stops compilation abruptly) … … 78 84 $(LI $(BUGZILLA 2731): Errors in associative array example) 79 85 $(LI $(BUGZILLA 2739): _argptr is invalid for functions nested in class methods) 86 $(LI $(BUGZILLA 2743): dumpobj gives "buss error" on Tiger) 80 87 $(LI $(BUGZILLA 2744): wrong init tocbuffer of forstatement) 81 88 $(LI $(BUGZILLA 2745): missing token tochars in lexer.c) … … 83 90 $(LI $(BUGZILLA 2750): Optimize slice copy with size known at compile time) 84 91 $(LI $(BUGZILLA 2751): incorrect scope storage class vardeclaration tocbuffer) 92 $(LI $(BUGZILLA 2752): std.xml does not encode CData correctly) 85 93 $(LI $(BUGZILLA 2754): The error message regarding implicit conversion to shared doesn't mention shared in the message.) 86 94 $(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.) … … 90 98 $(LI $(BUGZILLA 2766): DMD hangs with 0%cpu) 91 99 $(LI $(BUGZILLA 2767): DMD incorrectly mangles NTFS stream names) 100 $(LI $(BUGZILLA 2772): lib can't open response file) 92 101 ) 93 102 ) trunk/docsrc/class.dd
r833 r999 92 92 $(LI $(LINK2 #allocators, Class Allocators)) 93 93 $(LI $(LINK2 #deallocators, Class Deallocators)) 94 $(V2 95 $(LI $(LINK2 #AliasThis, Alias This))) 94 96 ) 95 97 ) … … 848 850 ) 849 851 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 --- 873 struct S 874 { int x; 875 alias x this; 876 } 877 878 int foo(int i) { return i * 2; } 879 880 void 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 850 893 <h3>$(LNAME2 auto, Scope Classes)</h3> 851 894 trunk/docsrc/struct.dd
r989 r999 363 363 $(GLINK StructPostblit) 364 364 $(GLINK StructDestructor)) 365 $(V2 366 $(LINK2 class.html#AliasThis, $(I AliasThis)) 367 ) 365 368 366 369 $(GNAME StructAllocator):
