On Sat, Sep 17, 2022 at 12:19:16AM +, frame via Digitalmars-d-learn wrote:
> On Friday, 16 September 2022 at 23:06:35 UTC, H. S. Teoh wrote:
>
> > Basically, if you pass something to .fun by value, then that value
> > must be destroyed by .fun once it's ready to return. So if the
> > value ha
On Friday, 16 September 2022 at 23:06:35 UTC, H. S. Teoh wrote:
Basically, if you pass something to .fun by value, then that
value must be destroyed by .fun once it's ready to return. So
if the value has a dtor, the dtor must be called upon exiting
from .fun. Since Variant has a throwing dto
On Fri, Sep 16, 2022 at 10:43:43PM +, frame via Digitalmars-d-learn 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 ref
```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 something on the
caller site but the signature of `fun()` should r
On 16.09.22 02:23, rikki cattermole wrote:
https://github.com/dlang/dub/issues/2483
Also the double --config option is already in a bugreport (quite old),
but not fixed as far as i can see:
https://github.com/dlang/dub/issues/1940
Kind regards,
Christian