2 REQUIRED_ARGS: -HC -c -o-
6 // Automatically generated by Digital Mars D Compiler
15 #ifdef CUSTOM_D_ARRAY_TYPE
16 #define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
18 /// Represents a D [] array
20 struct _d_dynamicArray final
25 _d_dynamicArray() : length(0), ptr(NULL) { }
27 _d_dynamicArray(size_t length_in, T *ptr_in)
28 : length(length_in), ptr(ptr_in) { }
30 T& operator[](const size_t idx) {
35 const T& operator[](const size_t idx) const {
47 typedef int32_t Nested;
62 enum : int32_t { SomeOtherLength = 1 };
64 struct ActualBuffer final
75 enum : int32_t { Enum = 42 };
77 static int32_t GsharedNum;
86 struct NotInstantiated final
105 template <typename T>
114 template <typename T>
123 template <typename T>
127 typedef typeof(1 + 2) Int;
128 typedef typeof(T::a) IC;
132 template <typename T>
134 typename T::Member i;
135 typename Outer::Member::Nested j;
136 void visit(typename T::Member::Nested i);
142 template <typename T, typename U>
145 extern A<A<int32_t > > aaint;
147 template <typename T>
153 virtual void parentVirtual();
156 template <typename T>
157 class Child final : public Parent<T >
161 void parentVirtual() override;
165 extern void withDefTempl(A<int32_t > a = A<int32_t >(2, 13));
167 template <typename T>
168 extern void withDefTempl2(A<T > a = static_cast<A<T >>(A<T >(2)));
170 class ChildInt : public Parent<int32_t >
174 struct HasMixins final
182 template <typename T>
183 struct HasMixinsTemplate final
191 extern HasMixinsTemplate<bool > hmti;
193 template <typename T>
196 enum : int32_t { length = 12 };
199 T otherBuffer[SomeOtherLength];
200 T calcBuffer[foo(1)];
206 template <typename Buffer>
207 struct BufferTmpl final
216 struct ImportedBuffer final
218 typedef ActualBuffer Buffer;
219 ActualBuffer buffer2;
224 ImportedBuffer(ActualBuffer buffer2) :
231 extern (C
++) struct A(T
)
235 __gshared GsharedNum
= 43;
236 immutable MemNum
= 13;
240 // Invalid declarations accepted because it's not instantiated
241 extern (C
++) struct NotInstantiated(T
)
244 enum missingSem
= T
.init
;
247 extern (C
++) struct B
252 // https://issues.dlang.org/show_bug.cgi?id=20604
266 extern (C
++) struct Array(T
)
268 alias This
= typeof(this);
269 alias Int
= typeof(1 + 2);
270 alias IC
= typeof(T
.a
);
272 this(size_t dim
) pure nothrow {}
277 bool opCast(T
)() const pure nothrow @nogc @safe
280 return str.ptr
!is null;
284 Outer
.Member
.Nested j
;
285 void visit(T
.Member
.Nested i
) {}
297 // alias AO = Array!Outer;
299 extern(C
++) T
foo(T
, U
)(U u
) { return T
.init
; }
301 extern(C
++) __gshared A
!(A
!int) aaint
;
303 extern(C
++) class Parent(T
)
306 final void parentFinal() {}
307 void parentVirtual() {}
310 extern(C
++) final class Child(T
) : Parent
!T
313 override void parentVirtual() {}
314 T
childFinal() { return T
.init
; }
317 extern(C
++) void withDefTempl(A
!int a
= A
!int(2)) {}
319 extern(C
++) void withDefTempl2(T
)(A
!T a
= A
!T(2)) {}
321 extern(C
++) alias withDefTempl2Inst
= withDefTempl2
!int;
323 extern(C
++) class ChildInt
: Parent
!int {}
325 /******************************************************
331 mixin template MixinA(T
)
336 mixin template MixinB() {}
344 struct HasMixinsTemplate(T
)
350 __gshared HasMixinsTemplate
!bool hmti
;
352 /// Declarations that look like associative arrays
354 extern(D
) enum SomeOtherLength
= 1;
362 T
[SomeOtherLength
] otherBuffer
;
363 T
[foo(1)] calcBuffer
;
366 // Same name but hidden by the template paramter
367 extern (D
) struct Buffer
{}
368 extern (D
) struct ActualBuffer
{}
370 struct BufferTmpl(Buffer
)
373 mixin BufferMixin
!();
376 struct ImportedBuffer
378 alias Buffer
= ActualBuffer
;
379 mixin BufferMixin
!();
382 mixin template BufferMixin()