October 05 General » Re: Template type inference problem | |||
|---|---|---|---|
| |||
...R.stringof);
}
}
import std.stdio;
void main()
{
const
int[] x;
//const
int y... | |||
October 04 Issues » [Issue 24795] New: emplace mutates immutable data in @safe code | |||
|---|---|---|---|
| |||
...obj, 456);
assert(obj.n == 456); // immutable object mutated!
}
void main() @safe
{
example1();
example2();
example3();
}
---
-- | |||
October 04 Issues » [Issue 24793] New: Allow implicit conversion of const pointers to void* | |||
|---|---|---|---|
| |||
...casting away const on void pointers.
```
void main()
{
const int* x = cast(int*) malloc(4... | |||
October 04 Learn » Re: How to evaluate a JSON file at compile time and create a struct out of it? | |||
|---|---|---|---|
| |||
...were at global scope". So:
```D
void main()
{
static struct S
{
int x, y;
}
static... | |||
October 04 Learn » Re: How to evaluate a JSON file at compile time and create a struct out of it? | |||
|---|---|---|---|
| |||
...file.json:
```
{
"name": "foo"
}
```
```
import std;
void main(){
immutable content = import("my_json_file.json... | |||
October 04 General » Re: Template type inference problem | |||
|---|---|---|---|
| |||
...const T* x, const T* y) { }
void main()
{
const Object o;
const Throwable t;
f... | |||
October 04 Learn » How to evaluate a JSON file at compile time and create a struct out of it? | |||
|---|---|---|---|
| |||
...sh main.d(12): Error: variable `content` cannot be read at compile time main.d... | |||
October 03 Learn » Wrapper for PAM | |||
|---|---|---|---|
| |||
...to!string);
return 3;
}
return 0;
}
int main(string[] args) {
string username = args[1];
string... | |||
October 03 Issues » [Issue 15843] D-type mangling used for extern(C) (extern) function declaration inside function body, on LDC, GDC, and DMD. | |||
|---|---|---|---|
| |||
...locally since a year or so:
```
void main() {
pragma(mangle, "func")
extern(C) int func... | |||
October 03 Issues » [Issue 24789] New: Disallow body-less, non-extern, local functions | |||
|---|---|---|---|
| |||
...void oops(){}
void main() {
void oops();
}
```
there could be an error for `main.oops` because... | |||
Copyright © 1999-2021 by the D Language Foundation