I recently removed Visual Studio 2017 and upgraded to 2022. When
I installed the latest DMD, it told me it couldn’t find a Visual
Studio installation and offered me to download e.g. Visual Studio
2019 or just VS 2019 Build Tools, etc.
Unsure what to do, I thought VS 2019 Build Tools is
On Thursday, 22 September 2022 at 10:53:32 UTC, Salih Dincer
wrote:
Is there a more accurate way to delete the '\0' characters at
the end of the string?
Accurate? No. Your code works. Correct is correct, no matter
efficiency or style.
I tried functions in this module:
On Friday, 16 September 2022 at 22:43:43 UTC, frame wrote:
```d
import std.variant;
// error: destructor `std.variant.VariantN!32LU.VariantN.~this`
is not `nothrow`
void fun(Variant v) nothrow
{
}
void main()
{
fun(Variant());
}
```
A reference, pointer or slice works. I could do
When I do `new void[](n)`, is that buffer allocated with an
alignment of 1 or what are the guarantees? How can I set an
alignment? Also, is the alignment of any type guaranteed to be a
power of 2?
Is there a trait (or a combination of traits) that gives me the
constraints of a template?
Example:
```D
void f(T1 : long, T2 : const(char)[])(T x) { }
template constraintsOf(alias templ) { /*Magic here*/ }
alias constraints = constraintsOf!f; // tuple(long, const(char)[])
```
At the moment, I
How do I invoke the member function in a reliable way? Given
`obj` of the type of the object, I used `mixin("obj.",
__traits(identifier, memberFunc), "(params)")`, but that has
issues, among probably others, definitely with visibility. (The
member function alias is a template parameter.)
On Wednesday, 3 May 2023 at 11:38:46 UTC, Adam D Ruppe wrote:
On Tuesday, 2 May 2023 at 13:57:23 UTC, Steven Schveighoffer
wrote:
Isn't that what `__traits(child)` is for?
https://dlang.org/spec/traits.html#child
Yes, `__traits(child, object, method_alias)(args)` is the way
to do it.
This
On Thursday, 25 May 2023 at 20:18:08 UTC, Dennis wrote:
On Thursday, 25 May 2023 at 15:37:00 UTC, Quirin Schroll wrote:
Is there a process? I can’t be the first one running into this.
Doing it in 3 PRs is the process.
Okay. It’s not that bad.
This is one of the reasons why druntime was
On Tuesday, 23 May 2023 at 13:52:15 UTC, Vladimir Panteleev wrote:
On Tuesday, 23 May 2023 at 13:50:09 UTC, Quirin Schroll wrote:
```
object.Exception@%LOCALAPPDATA%\dub\packages\ae-0.0.3236\ae\sys\d\manager.d(898): Command ["make", "-f",
"win32.mak", "MODEL=32",
I have 2 PRs, [one on
dlang/dlang.org](https://github.com/dlang/dlang.org/pull/3446)
and [one on dlang/dmd](https://github.com/dlang/dmd/pull/15245).
The latter fails a test because an example on the (current)
dlang.org fails. The dlang.org PR changes the example, and fails
likewise it’s
The dlang-bot writes a message to every PR:
Testing this PR locally
If you don't have a local development environment setup, you
can use Digger to test this PR:
```bash
dub run digger -- build "master + dmd#<>"
```
I installed the current DMD (version 2.103.1) and executed the
above
On Tuesday, 23 May 2023 at 13:50:09 UTC, Quirin Schroll wrote:
The dlang-bot writes a message to every PR:
Testing this PR locally
If you don't have a local development environment setup, you
can use Digger to test this PR:
```bash
dub run digger -- build "master + dmd#<>"
```
I
On Monday, 31 July 2023 at 18:15:25 UTC, Jonathan M Davis wrote:
On Monday, July 31, 2023 4:55:44 AM MDT Quirin Schroll via
Digitalmars-d-learn wrote:
Apparently, functions can be overloaded solely distinguished by
attributes:
```d
void f(ref int x) pure { x = 1; }
void f(ref int x) { x
Apparently, functions can be overloaded solely distinguished by
attributes:
```d
void f(ref int x) pure { x = 1; }
void f(ref int x) { x = 2; static int s; ++s; }
```
I thought that, maybe, a `pure` context calls the `pure` function
and an impure context calls the impure function, but no:
In the DMD compiler frontend, the type `TypeFunction` (cf.
astbase.d) representing a function type has a `linkage` member.
Setting this member when parsing seems to have no effect. How do
I set the linkage of a function type?
For alias declarations which support setting function type
In an attempt to come up with an [answer to a
post](https://forum.dlang.org/post/dnsuyvnfcszwefsfz...@forum.dlang.org), I found something odd, but useful, that I nonetheless don’t understand.
As far as I know – or rather thought I knew – `foreach` loops can
infer the types of the “loop
On Monday, 11 December 2023 at 23:21:45 UTC, Quirin Schroll wrote:
[…]
1. Instead of implementing a function `opApply(scope int
delegate(...))`, write a function template
`opApplyImpl(DG)(scope int delegate(...))` (or whatever name)
and let it take the delegate type as a template type
17 matches
Mail list logo