-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- SNEX: fix index templates not working
- Loading branch information
1 parent
b826cf4
commit ef3f769
Showing
6 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
BEGIN_TEST_DATA | ||
f: main | ||
ret: int | ||
args: int | ||
input: 12 | ||
output: 12 | ||
error: "" | ||
filename: "index/index14" | ||
END_TEST_DATA | ||
*/ | ||
|
||
struct MyClass | ||
{ | ||
span<int, 4> data = { 1, 2, 12, 4 }; | ||
|
||
int process() const | ||
{ | ||
index::clamped<0, false> idx; | ||
idx = 2; | ||
|
||
return data[idx]; | ||
} | ||
|
||
}; | ||
|
||
int main(int input) | ||
{ | ||
MyClass obj; | ||
|
||
return obj.process(); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
BEGIN_TEST_DATA | ||
f: main | ||
ret: int | ||
args: int | ||
input: 12 | ||
output: 12 | ||
error: "" | ||
filename: "struct/inner_getter" | ||
END_TEST_DATA | ||
*/ | ||
|
||
struct Outer | ||
{ | ||
struct Inner | ||
{ | ||
int getX() | ||
{ | ||
return x; | ||
} | ||
|
||
int x = 12; | ||
}; | ||
|
||
int getFromInner() | ||
{ | ||
return data.getX(); | ||
} | ||
|
||
Inner data; | ||
}; | ||
|
||
int main(int input) | ||
{ | ||
Outer obj; | ||
|
||
return obj.getFromInner(); | ||
} | ||
|