January 19, 2016 General » Re: rval->ref const(T), implicit conversions | |||
|---|---|---|---|
| |||
To clarify:
1) If `scope` were implemented, Manu's example would look like this:
// Declaration... | |||
January 19, 2016 General » Re: rval->ref const(T), implicit conversions | |||
|---|---|---|---|
| |||
It's ten times easier to write code that way, than the way Manu complained... | |||
January 19, 2016 General » Re: rval->ref const(T), implicit conversions | |||
|---|---|---|---|
| |||
It turns out, you're right, but this only makes arguments against passing rvalues to... | |||
January 19, 2016 General » Re: rval->ref const(T), implicit conversions | |||
|---|---|---|---|
| |||
Is this like...a sarcastic pull request? You can't actually expect people to write... | |||
January 19, 2016 General » Re: rval->ref const(T), implicit conversions | |||
|---|---|---|---|
| |||
https://github.com/D-Programming-Language/phobos/pull/3937 | |||
January 18, 2016 General » Re: rval->ref const(T), implicit conversions | |||
|---|---|---|---|
| |||
Isn't that backwards? I mean, @safe functions can't escape their parameters, so whether... | |||
January 18, 2016 General » Re: rval->ref const(T), implicit conversions | |||
|---|---|---|---|
| |||
...could add the temporaries and do implicit conversions by constructing CustomStrings from string literals as... | |||
January 18, 2016 General » Re: rval->ref const(T), implicit conversions | |||
|---|---|---|---|
| |||
Yeah.. I was initially for this proposal/PR, but on top of the fact that... | |||
January 18, 2016 General » Re: rval->ref const(T), implicit conversions | |||
|---|---|---|---|
| |||
Genericized:
template acceptRVals(alias func) {
private:
import std.traits : arity;
alias impl = acceptRVals!(arity!func... | |||
January 18, 2016 General » Re: rval->ref const(T), implicit conversions | |||
|---|---|---|---|
| |||
Actually, I was way overthinking things. Does *this* do what you want? import std.stdio... | |||
Copyright © 1999-2021 by the D Language Foundation