FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
daScript/tests/language/cpp_layout.das at master · WhyNot135/daScript · GitHub
WhyNot135
/
daScript
Public
forked from
GaijinEntertainment/daScript
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
daScript
/
tests
/
language
/
cpp_layout.das
Copy path
More file actions
More file actions
Latest commit
History
History
History
37 lines (31 loc) · 741 Bytes
Breadcrumbs
daScript
/
tests
/
language
/
cpp_layout.das
Copy path
File metadata and controls
37 lines (31 loc) · 741 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
options
gen2
// options log_infer_passes=true
require
UnitTest
require
dastest
/
testing_boost
public
struct
S1
{
a : int64 = 1l
b : int64 = 2l
c : int = 3
}
struct
S2
:
S1
{
d : int = 4
}
[
cpp_layout
(
pod
=
false
)]
struct
CppS1
{
vtable : void?
b : int64 = 2l
c : int = 3
}
[
cpp_layout
(
pod
=
false
)]
struct
CppS2
:
CppS1
{
d : int = 4
}
[
test
]
def
test_cpp_layout
(
t
:
T
?) {
t
|
>
equal
(
typeinfo
sizeof
(
type
<
S1
>
),
24
)
t
|
>
equal
(
typeinfo
sizeof
(
type
<
S2
>
),
24
)
t
|
>
equal
(
typeinfo
offsetof
<
d
>
(
type
<
S2
>
),
20
)
t
|
>
equal
(
typeinfo
sizeof
(
type
<
CppS1
>
),
CppS1Size
())
t
|
>
equal
(
typeinfo
sizeof
(
type
<
CppS2
>
),
CppS2Size
())
t
|
>
equal
(
typeinfo
offsetof
<
d
>
(
type
<
CppS2
>
),
CppS2DOffset
())
}
Back
|
FazBrowse Home
|
New Git URL