On Saturday, June 13, 2020 10:22:39 AM MDT John Chapman via Digitalmars-d-
learn wrote:
> On Saturday, 13 June 2020 at 15:33:55 UTC, Boris Carvajal wrote:
> > On Saturday, 13 June 2020 at 09:02:21 UTC, John Chapman wrote:
> >> Is this a bug or have I made a mistake? This worked a few days
> >> ago
On Sat, Jun 13, 2020 at 09:02:21AM +, John Chapman via Digitalmars-d-learn
wrote:
[...]
> module test;
>
> import std.uni;
>
> enum Cheese { cheddar, edam }
>
> void test(Cheese cheese) {
> final switch (cheese) {
> case Cheese.cheddar: break;
> case Cheese.edam: break;
> }
> }
>
On Saturday, 13 June 2020 at 11:26:58 UTC, Johannes Loher wrote:
Why is it a compile error to set `_a` directly but calling `a`
just works fine?
If we prevent modifying members of rvalues directly, I would
also expect calling non-const member functions of rvalues to be
prevented.
1)
Hello, I have a problem I can't even understand with the code
below:
https://run.dlang.io/is/7yXAEA
import std.stdio, std.range, std.algorithm, std.traits, std.meta;
struct UNIFORM{ string name; }
struct A{
int i1;
@UNIFORM() int i2;
@UNIFORM("fuzz") int i3;
@UNIFORM int i4;
On Saturday, 13 June 2020 at 12:55:36 UTC, realhet wrote:
My first question is, how to avoid that error with A.i4? Why
is there a difference between @UNIFORM and @UNIFORM(), do the
first returns a type and the later returns a value?
Basically yeah. a UDA in D is just whatever you write gets
On Saturday, 13 June 2020 at 12:55:36 UTC, realhet wrote:
Hello, I have a problem I can't even understand with the code
For the first I realized that an UDA can be a type too, and come
up with this:
template getUDA(alias a, U){
enum u = q{ getUDAs!(a, U)[$-1] };
static if(hasUDA!(a,
On Saturday, 13 June 2020 at 09:02:21 UTC, John Chapman wrote:
Is this a bug or have I made a mistake? This worked a few days
ago and I haven't changed my setup since then.
https://issues.dlang.org/show_bug.cgi?id=19548
Your code triggers it by using "-debug" option on
https://run.dlang.io/
If I use a final switch and import std.uni (or any other module
that imports it, such as std.string), I'm getting unresolved
external symbol errors with DMD 2.092.
This code triggers the issue:
---
module test;
import std.uni;
enum Cheese { cheddar, edam }
void test(Cheese cheese) {
On Saturday, 13 June 2020 at 09:13:36 UTC, Arafel wrote:
If, however, you're wrapping a function template, however, you
won't know until you actually instantiate it, which is
basically going back to Paul Backus' solution. So the compiler
doesn't always have all the information :)
Well, the
On 12/6/20 20:34, Stanislav Blinov wrote:
On Friday, 12 June 2020 at 17:50:43 UTC, Arafel wrote:
All in all, I still think something like `__traits(isRef,return)`
would still be worth adding! After all the compiler already has all
the information, so it's just about exposing it. I'm trying to
On Friday, 12 June 2020 at 20:12:46 UTC, Luis wrote:
Fails with dub test ?
Yes. In the same way.
On Friday, 12 June 2020 at 21:54:57 UTC, H. S. Teoh wrote:
On Fri, Jun 12, 2020 at 09:29:06PM +, MoonlightSentinel via
Digitalmars-d-learn wrote:
On Friday, 12 June 2020 at 18:18:25 UTC, Per Nordlöw wrote:
> How do I most easily track down which unittest in which file
> that causes the
Consider the following example:
```
struct A
{
auto a(int _a)
{
return this._a = _a;
}
int _a = 0;
}
void main()
{
static assert(!__traits(compiles, { A()._a = 2; }));
static assert(__traits(compiles, { A().a(2); }));
}
```
(https://run.dlang.io/is/GkmpA8)
Why
On 6/13/20 9:22 AM, John Chapman wrote:
Hmm, compiling with -release makes it work. Not a huge issue, I'll just
avoid final switches in debug mode until it's fixed. Thanks.
Apparently, it's a known issue:
https://issues.dlang.org/show_bug.cgi?id=19548
Ali
On Saturday, 13 June 2020 at 15:33:55 UTC, Boris Carvajal wrote:
On Saturday, 13 June 2020 at 09:02:21 UTC, John Chapman wrote:
Is this a bug or have I made a mistake? This worked a few days
ago and I haven't changed my setup since then.
https://issues.dlang.org/show_bug.cgi?id=19548
Your
On Saturday, 13 June 2020 at 13:08:29 UTC, realhet wrote:
How can be a string represented with 'null' by default instead
on `""`. Unless I state it explicitly with name="" ? o.O
Because string is simply `alias string = immutable(char)[]`, and
default initializer for arrays is null.
After a CTRL+C I still have the server process running on OSX. Any idea?
[main() INF] Listening for requests on http://[::1]:8080/
[main() INF] Listening for requests on http://127.0.0.1:8080/
[main() INF] Please open http://127.0.0.1:8080/ in your browser.
^C
[main() INF]
On Sat, Jun 13, 2020 at 9:20 PM Robert M. Münch via
Digitalmars-d-learn wrote:
>
> After a CTRL+C I still have the server process running on OSX. Any idea?
>
> [main() INF] Listening for requests on http://[::1]:8080/
> [main() INF] Listening for requests on http://127.0.0.1:8080/
>
On Monday, 18 November 2019 at 23:06:14 UTC, Per Nordlöw wrote:
Have anybody written support for DUB project types in Emacs'
projectile?
See:
https://www.projectile.mx/en/latest/projects/#adding-custom-project-types
Normally it should be as easy as this:
(projectile-register-project-type
Hi,
I'm trying to combine a couple of general types (associative
array, struct) in a compound data structure, but without success.
Here is what I'm trying to achieve:
"param" is a string variable
"parameters[param].id" is an integer value
"parameters[param].value" is a string
20 matches
Mail list logo