-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
420 additions
and
392 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,8 @@ | ||
#pragma safety enable | ||
|
||
struct item { | ||
char* _Owner title; | ||
struct item* _Owner _Opt next; | ||
}; | ||
|
||
struct list { | ||
struct item* _Owner _Opt head; | ||
struct item* _Opt tail; | ||
struct X { | ||
int x; | ||
}; | ||
|
||
bool list_is_empty(const struct list* list2) | ||
true(list2.head == nullptr && list2.tail == nullptr), | ||
false(list2.head != nullptr && list2.tail != nullptr) | ||
{ | ||
return list2->head != nullptr; | ||
} | ||
|
||
void list_clear(struct list* list1) | ||
pos(list_is_empty(list1)) | ||
{ | ||
list1->head = 0; | ||
} | ||
|
||
|
||
int main(int argc, char* argv[]) | ||
{ | ||
struct list l = {0}; | ||
list_clear(&l); | ||
static_state(l.head , "null"); | ||
int main() { | ||
constexpr struct X x = (struct X){ .x = 50 }; | ||
static_assert(x.x == 50); | ||
} |
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 |
---|---|---|
|
@@ -5,6 +5,6 @@ | |
|
||
#pragma once | ||
|
||
#define CAKE_VERSION "0.9.44" | ||
#define CAKE_VERSION "0.9.45" | ||
|
||
|
Large diffs are not rendered by default.
Oops, something went wrong.
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,8 @@ | ||
struct X { | ||
int x; | ||
}; | ||
|
||
int main() { | ||
constexpr struct X x = (struct X){ .x = 50 }; | ||
static_assert(x.x == 50); | ||
} |