Initial Commit
This commit is contained in:
706 files changed
+135430
No files matched your search
@@ -0,0 +1,21 @@
|
||||
#! @file zeroable.sakura
|
||||
#! @author John Christman (sorakatadzuma@gmail.com)
|
||||
#! @copyright Malunal Studios, LLC.
|
||||
#! @license MIT
|
||||
#!
|
||||
#! Contains the zeroable trait, which the compiler gives every type that has a
|
||||
#! zero value.
|
||||
|
||||
module core;
|
||||
|
||||
#! A type with a zero value, which a variable left without a value starts at: a
|
||||
#! number, `bool`, a pointer, an enum with a member of value 0, and an array,
|
||||
#! struct, or union of what is, where a struct's fields with defaults start at
|
||||
#! their defaults instead. A reference or a function is not, nor is what holds
|
||||
#! one.
|
||||
#!
|
||||
#! Generic code bounded by it may write `var made: T;`, and code that only may
|
||||
#! asks `if const T is zeroable` first.
|
||||
#!
|
||||
#! The compiler decides what is zeroable, so no type can implement it.
|
||||
pub trait zeroable {}
|
||||
Reference in new issue
Block a user