]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/compilable/dtoh_AliasDeclaration_98.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / compilable / dtoh_AliasDeclaration_98.d
1 /*
2 REQUIRED_ARGS: -HC=verbose -extern-std=c++98 -o-
3 TEST_OUTPUT:
4 ---
5 // Automatically generated by Digital Mars D Compiler v$n$
6
7 #pragma once
8
9 #include <assert.h>
10 #include <stddef.h>
11 #include <stdint.h>
12 #include <math.h>
13
14 #ifdef CUSTOM_D_ARRAY_TYPE
15 #define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
16 #else
17 /// Represents a D [] array
18 template<typename T>
19 struct _d_dynamicArray final
20 {
21 size_t length;
22 T *ptr;
23
24 _d_dynamicArray() : length(0), ptr(NULL) { }
25
26 _d_dynamicArray(size_t length_in, T *ptr_in)
27 : length(length_in), ptr(ptr_in) { }
28
29 T& operator[](const size_t idx) {
30 assert(idx < length);
31 return ptr[idx];
32 }
33
34 const T& operator[](const size_t idx) const {
35 assert(idx < length);
36 return ptr[idx];
37 }
38 };
39 #endif
40
41 template <typename T, typename U>
42 struct TS final
43 {
44 TS()
45 {
46 }
47 };
48
49 // Ignored dtoh_AliasDeclaration_98.TSD because `using` declarations require C++ 11
50 ---
51 */
52
53 extern(C++):
54
55 struct TS(T, U) {}
56 alias TSD = TS;