October 03, 2023 Learn » Re: The difference between T[] opIndex() and T[] opSlice() | |||
|---|---|---|---|
| |||
...d
struct S
{
int[] i;
ref opIndex(size_t index) => i[index];
//void opIndexAssign... | |||
October 03, 2023 Learn » T[] opIndex() Error: .. signal 11 | |||
|---|---|---|---|
| |||
...Node {
T data;
Node next;
this(T data) {
this.data=data;
}
}
string title;
size_t... | |||
October 03, 2023 Learn » Re: The difference between T[] opIndex() and T[] opSlice() | |||
|---|---|---|---|
| |||
...you can define a further `opIndexAssign(T val, size_t idx)`. However, now you lose... | |||
October 02, 2023 Learn » opIndexAssign | |||
|---|---|---|---|
| |||
...d
struct S
{
int[] i;
ref opIndex(size_t index) => i[index];
auto opSliceAssign/*
auto... | |||
October 02, 2023 Learn » Re: The difference between T[] opIndex() and T[] opSlice() | |||
|---|---|---|---|
| |||
...struct Matrix(T)
{
private T[][] elements;
size_t length;
T* ptr;
this(size_t length... | |||
October 01, 2023 Learn » Re: Straight Forward Arrays | |||
|---|---|---|---|
| |||
...passing around
DynamicArray(T)
{
size_t length;
T* ptr;
}
so you don't end up... | |||
October 01, 2023 Learn » Re: Straight Forward Arrays | |||
|---|---|---|---|
| |||
...T[] _storage;
private size_t _length;
const size_t length() => _length;
void length(size_t... | |||
September 30, 2023 Genel » Re: KareMatris (sürüm 1) | |||
|---|---|---|---|
| |||
...ekleyin:
```d
T* ptr;
auto opSliceAssign(T value, size_t a, size_t b)
{
return... | |||
September 29, 2023 Genel » KareMatris (sürüm 1) | |||
|---|---|---|---|
| |||
...olabilirim :)
```d
struct KareMatris(T)
{
T[][] elements;
size_t length;
size_t rowLength()
{
auto x... | |||
September 29, 2023 Genel » Array Matrix | |||
|---|---|---|---|
| |||
...size_t x, y;
}
```
```d
struct ArrayMatrix(T)
{
T[][] elements;
size_t length;
this(size... | |||
Copyright © 1999-2021 by the D Language Foundation