On Saturday, 22 April 2017 at 20:51:46 UTC, XavierAP wrote:
I can do:
int[3] arr = void;
arr[] = 1;
But apparently I can't do:
int[3][4] arr = void;
arr[][] = 1;
What is the best way? What am I missing?
int[3][4] arr = void;
(cast(int[]) arr)[] = 1;
assert(arr[3][2] == 1);
I couldn't figure out how to make a udp socket bound to a port of
my choosing on the local machine, to use for listening for
incoming connections.
On 04/22/2017 04:33 AM, Andrey wrote:
Hello, I trying to add custom attribute OnClickListener, the problem is
that typeof always return BaseView type instead of MyView.
There is also typeid() and .classinfo, which may be helpful:
writeln(this.classinfo.name);
Ali
I can do:
int[3] arr = void;
arr[] = 1;
But apparently I can't do:
int[3][4] arr = void;
arr[][] = 1;
What is the best way? What am I missing?
On Thursday, 20 April 2017 at 20:26:06 UTC, Nick Sabalausky
(Abscissa) wrote:
(even if it's from a C lib)
Same for D: .rdata is fine, but afaik you have only strings
there, the rest - .data, .bss, .tls will suffer the same issue.
On Saturday, 22 April 2017 at 12:23:32 UTC, Basile B. wrote:
use a "template this" parameter:
I think the nicest way to do it is to use the template this
parameter in the constructors, since that's the one function that
you can guarantee is always called on the most derived type.
Of
On Saturday, 22 April 2017 at 12:43:41 UTC, Andrey wrote:
On Saturday, 22 April 2017 at 12:23:32 UTC, Basile B. wrote:
On Saturday, 22 April 2017 at 11:45:54 UTC, Andrey wrote:
use a "template this" parameter:
void onCreate(this T)()
{
writeln(getSymbolsByUDA!(T,
On Saturday, 22 April 2017 at 12:23:32 UTC, Basile B. wrote:
On Saturday, 22 April 2017 at 11:45:54 UTC, Andrey wrote:
use a "template this" parameter:
void onCreate(this T)()
{
writeln(getSymbolsByUDA!(T, OnClickListener).stringof);
}
if possible. The problem is not solved if onCreate is
On Saturday, 22 April 2017 at 11:45:54 UTC, Andrey wrote:
On Saturday, 22 April 2017 at 11:36:09 UTC, Stefan Koch wrote:
On Saturday, 22 April 2017 at 11:33:22 UTC, Andrey wrote:
Hello, I trying to add custom attribute OnClickListener, the
problem is that typeof always return BaseView type
On Friday, 21 April 2017 at 19:17:32 UTC, Adam D. Ruppe wrote:
Then realize that it does exactly the same thing when it is
inside a switch... it always breaks the innermost thing, which
happens to be this loop. (note that cases are not `breaked`,
the switch is.)
By coincidence I ran into
On Saturday, 22 April 2017 at 11:36:09 UTC, Stefan Koch wrote:
On Saturday, 22 April 2017 at 11:33:22 UTC, Andrey wrote:
Hello, I trying to add custom attribute OnClickListener, the
problem is that typeof always return BaseView type instead of
MyView.
struct OnClickListener {
string id;
}
On Saturday, 22 April 2017 at 11:33:22 UTC, Andrey wrote:
Hello, I trying to add custom attribute OnClickListener, the
problem is that typeof always return BaseView type instead of
MyView.
struct OnClickListener {
string id;
}
class BaseView {
void onCreate() {
Hello, I trying to add custom attribute OnClickListener, the
problem is that typeof always return BaseView type instead of
MyView.
struct OnClickListener {
string id;
}
class BaseView {
void onCreate() {
writeln(getSymbolsByUDA!(typeof(this),
OnClickListener).stringof);
}
13 matches
Mail list logo