On Friday, 11 November 2016 at 23:55:58 UTC, Jonathan M Davis
wrote:
...
So, just provide a solid use case (if not multiple) as to why
it needs to have a specific order, and you probably stand a
good chance of it being added to the spec - especially since
it's what the implementation does
On Wednesday, June 27, 2018 22:59:03 Nathan S. via Digitalmars-d-learn
wrote:
> On Wednesday, 27 June 2018 at 22:39:26 UTC, Jonathan M Davis
>
> wrote:
> > You could explicitly instantiate the function template and then
> > take its address.
>
> Explicitly instantiating the template can result in
On 6/27/18 6:34 PM, Nathan S. wrote:
Let's say there's a function template `doImpl` and `doImpl(x)` compiles
thanks to IFTI. Is there any way to get the address of the function that
would be called in `doImpl(x)`?
It's a good question!
You may be able to use TemplateOf, TemplateArgsOf, and
On Wednesday, 27 June 2018 at 22:39:26 UTC, Jonathan M Davis
wrote:
You could explicitly instantiate the function template and then
take its address.
Explicitly instantiating the template can result in a function
that may be behaviorally identical but have a different address.
On Wednesday, June 27, 2018 22:34:46 Nathan S. via Digitalmars-d-learn
wrote:
> Let's say there's a function template `doImpl` and `doImpl(x)`
> compiles thanks to IFTI. Is there any way to get the address of
> the function that would be called in `doImpl(x)`?
You could explicitly instantiate
Let's say there's a function template `doImpl` and `doImpl(x)`
compiles thanks to IFTI. Is there any way to get the address of
the function that would be called in `doImpl(x)`?
On Wednesday, 27 June 2018 at 19:28:37 UTC, Timoses wrote:
Can't seem to avoid using mixin in main..
hehe yeah I see, didn't think of trying mixins, worth a shot! It
seems like you had fun at least ;)
On Wednesday, 27 June 2018 at 14:01:03 UTC, Alex wrote:
On Wednesday, 27 June 2018 at 12:02:10 UTC, aliak wrote:
===
The use case is for a non-nullable type, where I want to
guarantee that the value inside will never be null. I can't do
it for inner classes though. And I can't allow the user
On Wednesday, 27 June 2018 at 12:02:10 UTC, aliak wrote:
This currently fails unless you mark the class as static:
auto construct(T)() {
return new T;
}
void main() {
class C {}
auto s = construct!C;
}
So wondering if there's anything that can be done to get the
above working?
On 27/06/2018 12:37, Robert M. Münch wrote:
On 2018-06-27 06:22:19 +, Rainer Schuetze said:
- Windows-10, 64bit, running in a Parallels VM on OSX 10.13.5
- VS-2017 latest patch applied
If you try to debug 64-bit-builds, mago starts another monitoring
process. Maybe there are issues
On Wednesday, 27 June 2018 at 15:27:09 UTC, Steven Schveighoffer
wrote:
On 6/27/18 6:22 AM, Vijay Nayar wrote:
Does this mean that the `alias other aliasName;` syntax is
preferred, or does it simply mean that this is a low priority
issue that hasn't been addressed yet?
IIRC, there was an
On Wednesday, 27 June 2018 at 17:07:52 UTC, Jonathan M Davis
wrote:
On Wednesday, June 27, 2018 16:19:56 Luka Aleksic via
Digitalmars-d-learn wrote:
[...]
[...]
Well, for one, what's on the left side of the = doesn't
normally affect the type of what's on the right. It does in
some cases
On Wednesday, 27 June 2018 at 16:19:56 UTC, Luka Aleksic wrote:
[…]
I am getting the following error:
scratch.d(14): Error: struct scratch.pair cannot deduce
function from argument types !()(char, int), candidates are:
scratch.d(2):scratch.pair(T, U)
Failed: ["/usr/bin/dmd", "-v",
On Wed, Jun 27, 2018 at 04:19:56PM +, Luka Aleksic via Digitalmars-d-learn
wrote:
[...]
> struct pair(T, U) {
> T first;
> U second;
>
> this(T arg_first, U arg_second) {
> first = arg_first;
> second = arg_second;
> }
> };
>
> void main()
On Wednesday, June 27, 2018 16:19:56 Luka Aleksic via Digitalmars-d-learn
wrote:
> Hello,
>
> In the following code:
>
> T first;
> U second;
>
> this(T arg_first, U arg_second) {
> first = arg_first;
> second = arg_second;
> }
> };
>
> void main() {
>
> pair!(char, uint)
Hello,
In the following code:
struct pair(T, U) {
T first;
U second;
this(T arg_first, U arg_second) {
first = arg_first;
second = arg_second;
}
};
void main() {
pair!(char, uint) p1 = pair('a', 1);
}
I am getting the
On Wednesday, 27 June 2018 at 15:18:05 UTC, Alex wrote:
On Wednesday, 27 June 2018 at 15:07:57 UTC, Uknown wrote:
On Wednesday, 27 June 2018 at 14:50:25 UTC, Alex wrote:
On Wednesday, 27 June 2018 at 14:29:33 UTC, Uknown wrote:
On Wednesday, 27 June 2018 at 14:21:39 UTC, Alex wrote:
On
On 6/27/18 6:22 AM, Vijay Nayar wrote:
Does this mean that the `alias other aliasName;` syntax is preferred, or
does it simply mean that this is a low priority issue that hasn't been
addressed yet?
IIRC, there was an ambiguity for using the new syntax for alias this. I
don't remember the
On Wednesday, 27 June 2018 at 15:07:57 UTC, Uknown wrote:
On Wednesday, 27 June 2018 at 14:50:25 UTC, Alex wrote:
On Wednesday, 27 June 2018 at 14:29:33 UTC, Uknown wrote:
On Wednesday, 27 June 2018 at 14:21:39 UTC, Alex wrote:
On Wednesday, 27 June 2018 at 13:27:46 UTC, Uknown wrote:
[...]
On Wednesday, 27 June 2018 at 14:50:25 UTC, Alex wrote:
On Wednesday, 27 June 2018 at 14:29:33 UTC, Uknown wrote:
On Wednesday, 27 June 2018 at 14:21:39 UTC, Alex wrote:
On Wednesday, 27 June 2018 at 13:27:46 UTC, Uknown wrote:
[...]
I see. Ok, one possibility is
source = indexed(source,
On Wednesday, 27 June 2018 at 14:29:33 UTC, Uknown wrote:
On Wednesday, 27 June 2018 at 14:21:39 UTC, Alex wrote:
On Wednesday, 27 June 2018 at 13:27:46 UTC, Uknown wrote:
Title says it all. Is there a trivial way to do this?
There are
On Wednesday, 27 June 2018 at 14:29:18 UTC, Basile B. wrote:
On Wednesday, 27 June 2018 at 14:23:25 UTC, Uknown wrote:
On Wednesday, 27 June 2018 at 14:01:06 UTC, Basile B. wrote:
[...]
You can use this syntax for functions :
`alias proto_identifier = void function();`
Nah it's not the
On Wednesday, 27 June 2018 at 14:29:18 UTC, Basile B. wrote:
On Wednesday, 27 June 2018 at 14:23:25 UTC, Uknown wrote:
On Wednesday, 27 June 2018 at 14:01:06 UTC, Basile B. wrote:
On Wednesday, 27 June 2018 at 12:25:26 UTC, Uknown wrote:
On Wednesday, 27 June 2018 at 10:22:38 UTC, Vijay Nayar
On Wednesday, 27 June 2018 at 14:21:39 UTC, Alex wrote:
On Wednesday, 27 June 2018 at 13:27:46 UTC, Uknown wrote:
Title says it all. Is there a trivial way to do this?
There are
https://dlang.org/library/std/algorithm/mutation/reverse.html
and
https://dlang.org/library/std/range/retro.html
On Wednesday, 27 June 2018 at 14:23:25 UTC, Uknown wrote:
On Wednesday, 27 June 2018 at 14:01:06 UTC, Basile B. wrote:
On Wednesday, 27 June 2018 at 12:25:26 UTC, Uknown wrote:
On Wednesday, 27 June 2018 at 10:22:38 UTC, Vijay Nayar wrote:
[...]
aliasing a function type only works with the
On Wednesday, 27 June 2018 at 14:01:06 UTC, Basile B. wrote:
On Wednesday, 27 June 2018 at 12:25:26 UTC, Uknown wrote:
On Wednesday, 27 June 2018 at 10:22:38 UTC, Vijay Nayar wrote:
[...]
aliasing a function type only works with the old syntax too:
alias void proto_identifier();
Very
On Wednesday, 27 June 2018 at 13:27:46 UTC, Uknown wrote:
Title says it all. Is there a trivial way to do this?
There are
https://dlang.org/library/std/algorithm/mutation/reverse.html
and
https://dlang.org/library/std/range/retro.html
both require a bidirectional range, which Indexed, luckily
On Wednesday, 27 June 2018 at 12:02:10 UTC, aliak wrote:
===
The use case is for a non-nullable type, where I want to
guarantee that the value inside will never be null. I can't do
it for inner classes though. And I can't allow the user to do
something like:
void main() {
class C {}
On Wednesday, 27 June 2018 at 12:25:26 UTC, Uknown wrote:
On Wednesday, 27 June 2018 at 10:22:38 UTC, Vijay Nayar wrote:
Most of the documentation at
https://dlang.org/spec/declaration.html#alias uses examples of
the form: `alias aliasName = other;`, where `aliasName`
becomes the new name to
Title says it all. Is there a trivial way to do this?
On Wednesday, 27 June 2018 at 10:22:38 UTC, Vijay Nayar wrote:
Most of the documentation at
https://dlang.org/spec/declaration.html#alias uses examples of
the form: `alias aliasName = other;`, where `aliasName`
becomes the new name to reference `other`. Alternatively, one
may write `alias
This currently fails unless you mark the class as static:
auto construct(T)() {
return new T;
}
void main() {
class C {}
auto s = construct!C;
}
So wondering if there's anything that can be done to get the
above working?
Or if there isn't then how could the compiler be enhanced
On 2018-06-27 06:22:19 +, Rainer Schuetze said:
Works for me, can you give more details? VS version, platform, etc.
- Windows-10, 64bit, running in a Parallels VM on OSX 10.13.5
- VS-2017 latest patch applied
Please note that there is no need to select the Mago debug engine in
VS2013 or
Most of the documentation at
https://dlang.org/spec/declaration.html#alias uses examples of
the form: `alias aliasName = other;`, where `aliasName` becomes
the new name to reference `other`. Alternatively, one may write
`alias other aliasName;`. My understanding is that the syntax
with `=`
On 26/06/2018 16:25, Robert M. Münch wrote:
On 2018-06-24 13:08:53 +, Rainer Schuetze said:
a new release of Visual D has just been uploaded. Major changes are
* improved Visual C++ project integration: better dependencies,
automatic libraries, name demangling
* new project wizard
*
35 matches
Mail list logo