Re: Pointer to dlang spec for this alias construct?

2024-06-17 Thread Andy Valencia via Digitalmars-d-learn
On Monday, 17 June 2024 at 05:05:06 UTC, Jonathan M Davis wrote: alias Unshared(T) = T; alias Unshared(T: shared U, U) = U; ... Unshared is an eponymous template. https://dlang.org/spec/template.html#implicit_template_properties And it's using a shortcut syntax. ... The second templat

Re: Pointer to dlang spec for this alias construct?

2024-06-16 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, June 16, 2024 10:32:50 PM MDT Andy Valencia via Digitalmars-d-learn wrote: > In the alias: > > alias Unshared(T) = T; > alias Unshared(T: shared U, U) = U; > > as used in: > > cast(Unshared!mytype)value > > turns a mytype with shared attribute into one without shared. > >

Re: Pointer to dlang spec for this alias construct?

2024-06-16 Thread evilrat via Digitalmars-d-learn
On Monday, 17 June 2024 at 04:32:50 UTC, Andy Valencia wrote: In the alias: alias Unshared(T) = T; alias Unshared(T: shared U, U) = U; as used in: cast(Unshared!mytype)value turns a mytype with shared attribute into one without shared. I deduce the alias is using some sort of typ

Pointer to dlang spec for this alias construct?

2024-06-16 Thread Andy Valencia via Digitalmars-d-learn
In the alias: alias Unshared(T) = T; alias Unshared(T: shared U, U) = U; as used in: cast(Unshared!mytype)value turns a mytype with shared attribute into one without shared. I deduce the alias is using some sort of type matching and decomposition? I've read through the language

Re: Dlang spec

2021-03-13 Thread Imperatorn via Digitalmars-d-learn
On Saturday, 13 March 2021 at 11:48:47 UTC, Bastiaan Veelo wrote: On Thursday, 11 March 2021 at 19:38:01 UTC, Imperatorn wrote: [...] The spec is written in ddoc format, and I thought that ddoc was able to output in PDF (at least at one point). It didn’t look very good and I’m not sure if th

Re: Dlang spec

2021-03-13 Thread Bastiaan Veelo via Digitalmars-d-learn
On Thursday, 11 March 2021 at 19:38:01 UTC, Imperatorn wrote: I created some PDFs (on request) of the dlang spec mobi-file and uploaded them here: https://gofile.io/d/ijctZt Different converters were used, hence multiple files. Maybe someone can upload a good version on dlang.org and link to