On 18.06.21 14:40, vit wrote:
Are asserts enough to make method @trusted or is something like throw
exception or return error code necessary?
Asserts are a debugging feature. They're not suitable to ensure safety,
because they're simply skipped in release mode.
`assert(false);` is the
Are asserts enough to make method @trusted or is something like
throw exception or return error code necessary? How it work in
phobos?
Example:
```d
struct Slice(T){
private T[] data;
this(T[] data){
this.data = data;
}
inout(T)[] opSlice()inout scope return