2 REQUIRED_ARGS: -extern-std=c++98 -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 {
42 static int32_t const Anon = 10;
44 static bool const Anon2 = true;
46 static const char* const Anon3 = "wow";
56 EnumDefaultType_One = 1,
57 EnumDefaultType_Two = 2,
74 AnonWithTypeOne = 1LL,
75 AnonWithTypeTwo = 2LL,
78 namespace EnumWithStringType
80 static const char* const One = "1";
81 static const char* const Two = "2";
84 namespace EnumWithImplicitType
86 static const char* const One = "1";
87 static const char* const Two = "2";
92 static const char* const AnonWithStringOne = "1";
93 static const char* const AnonWithStringTwo = "2";
96 static int32_t const AnonMixedOne = 1;
97 static int64_t const AnonMixedTwo = 2LL;
98 static const char* const AnonMixedA = "a";
107 static STC const STC_D = (STC)3;
123 static Foo const A = Foo(42);
124 static Foo const B = Foo(84);
127 static /* MyEnum */ Foo const test = Foo(42);
143 static FooCpp const A = FooCpp(42);
144 static FooCpp const B = FooCpp(84);
147 static /* MyEnum */ Foo const testCpp = Foo(42);
149 extern const bool e_b;
155 extern(C
++) enum Anon2
= true;
156 extern(C
++) enum Anon3
= "wow";
164 enum EnumDefaultType
: int
170 enum EnumWithType
: byte
188 enum EnumWithStringType
: string
194 enum EnumWithImplicitType
202 AnonWithStringOne
= "1",
203 AnonWithStringTwo
= "2"
209 long AnonMixedTwo
= 2,
210 string AnonMixedA
= "a"
219 extern(C
++) enum STC_D
= STC
.a | STC
.b
;
221 struct Foo
{ int i
; }
222 enum MyEnum
{ A
= Foo(42), B
= Foo(84) }
223 extern(C
++) enum test = MyEnum
.A
;
225 extern(C
++) struct FooCpp
{ int i
; }
226 enum MyEnumCpp
{ A
= FooCpp(42), B
= FooCpp(84) }
227 extern(C
++) enum testCpp
= MyEnum
.A
;
229 // currently unsupported enums
230 extern(C
++) enum b
= [1, 2, 3];
231 extern(C
++) enum c
= [2: 3];
233 extern(C
) void foo();
234 extern(C
++) enum d
= &foo
;
236 __gshared
immutable bool e_b
;
237 extern(C
++) enum e
= &e_b
;
239 // Opaque enums require C++ 11
241 enum typedOpaque
: long;
242 enum arrayOpaque
: int[4];
244 extern(D
) enum hidden_d
= 42; // Linkage prevents being exported to C++