In the code below, is it possible to combine both bar functions
into one function (I just put some random foo function to get it
to work)?
When I try to do it, I get errors that
no property 'expand' for type '(Tuple!(int, int))'
I think it has something to do with T... being considered a
On Friday, 15 July 2016 at 19:24:12 UTC, jmh530 wrote:
Have you considered recursive solutions?
Will try that next. Thanks.
I think this worked for me.
A few tricks were that I had to have the fillAliasSeq template as
global and also I couldn't disable the default constructor for
what I
On 7/15/16 7:44 AM, ag0aep6g wrote:
On 07/15/2016 12:54 PM, dom wrote:
i just had a scenario like the one below. when calling .array on the
filterresult dmd goes nuts because of the init() function in Players.
Renaming to initialize() solved the problem.
Solution: As .init is used for struct
On Monday, 18 July 2016 at 21:12:38 UTC, Meta wrote:
On Monday, 18 July 2016 at 13:00:16 UTC, Lodovico Giaretta
wrote:
As per title, is it possible to iterate all visible symbols of
the current module and of all imported modules and packages?
My aim is to find everything in scope that has a
On Monday, 18 July 2016 at 18:21:41 UTC, ketmar wrote:
short answer: no.
there is still no way to write a reliable enumerator like this:
too much things to hack around.
as for module symbols, it is easy: they has no type. literally:
`!is(typeof(...))`.
`is(typeof(...))` is a necessary
On Monday, 18 July 2016 at 13:00:16 UTC, Lodovico Giaretta wrote:
As per title, is it possible to iterate all visible symbols of
the current module and of all imported modules and packages? My
aim is to find everything in scope that has a specific UDA.
module foo;
import std.stdio,
On Monday, 18 July 2016 at 13:00:16 UTC, Lodovico Giaretta wrote:
// how do I discover that "std" is a package?
I've got a DMD pull request that adds __traits(isPackage,
someSymbol), but it's stuck waiting for approval. If and when it
gets merged, it could be useful for that.
On Monday, 18 July 2016 at 18:49:22 UTC, Rufus Smith wrote:
Suppose I have the following: alias func = void function(int);
Is there a way to convert it automatically to something the
same type except of delegate: alias del = toDel(func) = void
delegate(int);?
import std.traits;
alias del =
On Monday, 18 July 2016 at 18:51:29 UTC, Jacob Carlborg wrote:
On 2016-07-18 20:49, Rufus Smith wrote:
Suppose I have the following: alias func = void function(int);
Is there a way to convert it automatically to something the
same type
except of delegate: alias del = toDel(func) = void
Suppose I have the following: alias func = void function(int);
Is there a way to convert it automatically to something the same
type except of delegate: alias del = toDel(func) = void
delegate(int);?
On 2016-07-18 20:49, Rufus Smith wrote:
Suppose I have the following: alias func = void function(int);
Is there a way to convert it automatically to something the same type
except of delegate: alias del = toDel(func) = void delegate(int);?
short answer: no.
there is still no way to write a reliable enumerator like this:
too much things to hack around.
as for module symbols, it is easy: they has no type. literally:
`!is(typeof(...))`.
`is(typeof(...))` is a necessary safeguard anyway if you are
enumerating symbols in module,
On Monday, 18 July 2016 at 17:35:29 UTC, Stefan Koch wrote:
I did it for function templates just now.
It will the instantiated bodys to std-out.
Okay here is the frist really hacky draft patch
In dtemplate.d line 6691 right at the end of semantic3 insert the
following code :
if
On Sunday, 17 July 2016 at 16:30:38 UTC, Stefan Koch wrote:
On Sunday, 17 July 2016 at 14:54:34 UTC, zabruk70 wrote:
On Sunday, 17 July 2016 at 11:14:39 UTC, Stefan Koch wrote:
If you want to see template expansions you have to wait a
little longer.
Wow! Is this really possible?! So long
On Saturday, 16 July 2016 at 21:16:29 UTC, Andrew Godfrey wrote:
COM is a model; in practice people pick the parts they need,
and often still call it "COM".
No need to rename what has a name:
https://en.wikipedia.org/wiki/Interface-based_programming
On Saturday, 16 July 2016 at 20:31:25 UTC, Adam Sansier wrote:
Yet you are wrong. Regardless what the asio standard does right
or wrong, it uses COM, correct? Is asio not well established?
Yes it is. Hence it proves that not all COM is as you think it
is.
The component must comply with the
On Monday, 18 July 2016 at 07:37:27 UTC, lobo wrote:
On Sunday, 17 July 2016 at 05:57:52 UTC, WhatMeWorry wrote:
[snip]
Now that I think about, was there even a way to look at c/c++
code after the pre-processor step?
Does this do what you want?
cl.exe /E
gcc -E
clang -E
clang-cl /E
i
On Saturday, 16 July 2016 at 22:05:49 UTC, ketmar wrote:
`foreach (v; rng)` looks like `foreach` is *reusing* *existing*
*variable*.
+1
As per title, is it possible to iterate all visible symbols of
the current module and of all imported modules and packages? My
aim is to find everything in scope that has a specific UDA.
module foo;
import std.stdio, std.array, std.algorithm;
void bar(){}
struct S{}
void main()
{
//
On Friday, 15 July 2016 at 17:25:23 UTC, cy wrote:
On Monday, 20 June 2016 at 16:39:54 UTC, Marc Schütz wrote:
Untested:
Seems to only work if A and B are both defined in the same file
as Foos (defeating the purpose). Putting A and B in a.d and b.d
respectively gives me these errors:
On Sunday, 17 July 2016 at 16:30:38 UTC, Stefan Koch wrote:
On Sunday, 17 July 2016 at 14:54:34 UTC, zabruk70 wrote:
On Sunday, 17 July 2016 at 11:14:39 UTC, Stefan Koch wrote:
If you want to see template expansions you have to wait a
little longer.
Wow! Is this really possible?! So long
On Sunday, 17 July 2016 at 05:57:52 UTC, WhatMeWorry wrote:
[snip]
Now that I think about, was there even a way to look at c/c++
code after the pre-processor step?
Does this do what you want?
cl.exe /E
gcc -E
clang -E
clang-cl /E
16.07.2016 20:26, cy пишет:
Say I have a package called "main" and a sub-package in a
"complicatedexample" directory, and my dub.json in "main" looks sort of
like:
"subPackages": [
"./complicatedexample/"
],
Let's say I do *not* have ":complicatedexample" in my dependencies for
"main", but
On Monday, 18 July 2016 at 04:54:07 UTC, Rufus Smith wrote:
Is there any MSB to LSB and vice versa in phobos? Or some
tricks with templates that make it fast as possible?
you mean endianness conversions? then yes. see
std.bitmanip:swapendian and friends.
24 matches
Mail list logo