On Friday, 13 January 2017 at 16:56:43 UTC, WhatMeWorry wrote:
A vec and scalar can't be added together. So why (or how) is
the glm code working?
The C++ source disagrees:
https://github.com/g-truc/glm/blob/master/glm/detail/type_vec2.hpp#L219
It works via operator overloading, and adding a
On Monday, 26 December 2016 at 21:15:03 UTC, Adam D. Ruppe wrote:
On Monday, 26 December 2016 at 20:07:56 UTC, crimaniak wrote:
// I want to see Foo here and use it's reflection to
iterate fields and methods.
then pass foo to it
What do you mean parent symbol? I assumed you mean
On Tuesday, 27 December 2016 at 02:05:27 UTC, Ali Çehreli wrote:
On 12/26/2016 02:04 PM, crimaniak wrote:
So my main question: how it is possible to do such thing?
Just to make sure we're on the same page: :)
* There is 'interface' in addition to 'class'
Yes. I want it for structs exactly
On 12/26/2016 02:04 PM, crimaniak wrote:
So my main question: how it is possible to do such thing?
Just to make sure we're on the same page: :)
* There is 'interface' in addition to 'class'
* If all you want is to check, then you can write template constraints
by following the example
s option I like less, and I have not researched it.
So my main question: how it is possible to do such thing?
On Monday, 26 December 2016 at 20:07:56 UTC, crimaniak wrote:
// I want to see Foo here and use it's reflection to
iterate fields and methods.
then pass foo to it
What do you mean parent symbol? I assumed you mean subclass but
your example shows one class and one struct. So is
```
class uda
{
this()
{
// I want to see Foo here and use it's reflection to
iterate fields and methods.
}
}
@uda
struct Foo
{
}
```
Is there a way to do it?
On Wednesday, 14 December 2016 at 07:15:08 UTC, Bauss wrote:
If a function is only called during compile-time will it be
available at runtime?
With "available at runtime", I guess you mean "will it be part of
the object file". In that case: yes. Because even if a function
is _never_ called,
On Wednesday, 14 December 2016 at 07:15:08 UTC, Bauss wrote:
If a function is only called during compile-time will it be
available at runtime?
It depends. When linking unused functions can be removed by
-gc-sections, but only when linking an executable.
But obviously if you use it at
If a function is only called during compile-time will it be
available at runtime?
Hi,
I am using DUB with the SDL language and I have two questions:
1. How can I add some text file to my project? I want to add shaders
in my Visual Project.
2. How to make a compiler option depending on the platform and debug
mode at the same time?
Thanks.
Thank you all for the replies. I'm extremely grateful. I'll look
into each and every answer.
be glad for you folks to tell me what I'm missing.
And for the second part of the question, I can't seem to make a
Dynamic Array where I could store the delegates taken in the
"registerEvent" method. Closest thing I have gotten to is this:
private void delegate(T)(T args)[string] eve
way I did it, so I'll
be glad for you folks to tell me what I'm missing.
And for the second part of the question, I can't seem to make a
Dynamic Array where I could store the delegates taken in the
"registerEvent" method. Closest thing I have gotten to is this:
private void delega
On Thursday, 1 December 2016 at 23:51:19 UTC, Payotz wrote:
So, to give context, I am trying to make an event manager for a
game I'm making.
I was writing the "register()" method so I ran into a problem.
The register method will take in delegates as an argument, but
those delegates have
way I did it, so I'll be glad
> for you folks to tell me what I'm missing.
All you need is your interface to these callbacks.
> And for the second part of the question, I can't seem to make a Dynamic
> Array where I could store the delegates taken in the "registerEvent"
> method.
);
>
> I know there's something missing in the way I did it, so I'll be glad
> for you folks to tell me what I'm missing.
>
> And for the second part of the question, I can't seem to make a
> Dynamic Array where I could store the delegates taken in the
> "registerEvent&q
'm missing.
And for the second part of the question, I can't seem to make a
Dynamic Array where I could store the delegates taken in the
"registerEvent" method. Closest thing I have gotten to is this:
private void delegate(T)(T args)[string] event;
which resulted in the compiler screaming Error signs at
On Thursday, 24 November 2016 at 17:59:55 UTC, ag0aep6g wrote:
Took me a bit to find it, but it is documented:
"If both a template with a sequence parameter and a template
without a sequence parameter exactly match a template
instantiation, the template without a TemplateSequenceParameter
On Thursday, 24 November 2016 at 17:47:04 UTC, Steven
Schveighoffer wrote:
void foo(T)(T t){writeln("a");}
void foo(T...)(T t){writeln("b");}
foo(1);
Compiles? If so, which prints out?
I was surprised by the answer. I can't find docs for it. Is the
behavior intended?
-Steve
That is
On 11/24/2016 06:47 PM, Steven Schveighoffer wrote:
void foo(T)(T t){writeln("a");}
void foo(T...)(T t){writeln("b");}
foo(1);
Compiles? If so, which prints out?
I was surprised by the answer. I can't find docs for it. Is the behavior
intended?
Took me a bit to find it, but it is
void foo(T)(T t){writeln("a");}
void foo(T...)(T t){writeln("b");}
foo(1);
Compiles? If so, which prints out?
I was surprised by the answer. I can't find docs for it. Is the behavior
intended?
-Steve
static MySingleton get() {
if (instance_ is null) {
synchronized {
if (instance_ is null) {
atomicStore(instance_, new MySingleton);
}
}
}
return instance_;
}
This should work fine and faster.
On 11/15/16 3:05 PM, Kapps wrote:
Keep in mind, this is only slow for such a large amount of calls.
If you're calling this only a hundred times a second, then who cares if
it's slower. After all, with GDC we were looking at 1 billion calls in
21 seconds. That's 47,000 calls per *millisecond*.
On Monday, 14 November 2016 at 17:43:37 UTC, WhatMeWorry wrote:
I was reading this fasciniating article:
https://davesdprogramming.wordpress.com/2013/05/06/low-lock-singletons/
And to quote a section of it:
-
static MySingleton get() {
On 11/14/16 12:43 PM, WhatMeWorry wrote:
I was reading this fasciniating article:
https://davesdprogramming.wordpress.com/2013/05/06/low-lock-singletons/
And to quote a section of it:
-
static MySingleton get() {
synchronized {
if
I was reading this fasciniating article:
https://davesdprogramming.wordpress.com/2013/05/06/low-lock-singletons/
And to quote a section of it:
-
static MySingleton get() {
synchronized {
if (instance_ is null) {
instance_ =
On Wednesday, 9 November 2016 at 06:28:31 UTC, Jim wrote:
What does it mean when a variable name starts with a '.'
`.a` --> `::a`.
On 09/11/2016 7:28 PM, Jim wrote:
Hi,
I'm a very experienced C++ programmer, looking at a program written in
D. D is similar enough to C++ and Java that I have no problem
understanding it - except for one thing. I think I may have figured it
out, but I want to confirm my understanding.
What
Hi,
I'm a very experienced C++ programmer, looking at a program
written in D. D is similar enough to C++ and Java that I have no
problem understanding it - except for one thing. I think I may
have figured it out, but I want to confirm my understanding.
What does it mean when a variable name
[] args)
{
err.open("errors.log", "a");
err.write("test\n");
}
...
```
but as can I see, that hasn't any effect for tcplistener
module...
OK ... problem with tcplistener solved, just a code mistake.
But the
question is actual.
I can honestl
err.write("test\n");
}
...
```
but as can I see, that hasn't any effect for tcplistener module...
OK ... problem with tcplistener solved, just a code mistake. But the
question is actual.
I can honestly say, I don't know what dsfml is or any of the code you
have posted.
-Steve
but as can I see, that hasn't any effect for tcplistener
module...
OK ... problem with tcplistener solved, just a code mistake. But
the question is actual.
ADD:
I tried to open other stream in main()
```
...
import dsfml.system.err;
int main(string[] args)
{
err.open("errors.log", "a");
err.write("test\n");
}
...
```
but as can I see, that hasn't any effect for tcplistener module...
I need to see errors from dsfml.system.err, but it doesn't write
to terminal as I expected.
The general problem is that I cannot listen any port by
tcplistener. And listen method is:
Status accept(TcpSocket socket)
{
import dsfml.system.string;
On Friday, 28 October 2016 at 14:12:53 UTC, Mike Parker wrote:
On Friday, 28 October 2016 at 13:19:19 UTC, WhatMeWorry wrote:
[...]
I generally use GLFW event callbacks to populate an event queue
with custom event types, then process the queue and handle
events elsewhere. That way, the
On Friday, 28 October 2016 at 13:19:19 UTC, WhatMeWorry wrote:
Anyone have a good example of what I should be doing?
I generally use GLFW event callbacks to populate an event queue
with custom event types, then process the queue and handle events
elsewhere. That way, the callbacks need no
On Thursday, 27 October 2016 at 22:51:13 UTC, pineapple wrote:
On Thursday, 27 October 2016 at 22:17:35 UTC, WhatMeWorry wrote:
I'm using Derelict GLFW3 and I found the following GLFW3 code
snippet in a demo.
In a small demo, crap like this usually isn't a big deal.
It's not common
On Thursday, 27 October 2016 at 22:17:35 UTC, WhatMeWorry wrote:
I'm using Derelict GLFW3 and I found the following GLFW3 code
snippet in a demo.
In a small demo, crap like this usually isn't a big deal.
It's not common practice, though, and for good reason. You should
definitely avoid
I'm using Derelict GLFW3 and I found the following GLFW3 code
snippet in a demo.
float distance = 3.0;
extern(C) void key_callback(GLFWwindow* window, int key, int
scancode, int action, int modifier) nothrow
{
if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS)
{
On 10/22/16 5:34 PM, WhatMeWorry wrote:
On Saturday, 22 October 2016 at 20:51:14 UTC, Jonathan M Davis wrote:
On Saturday, October 22, 2016 20:35:27 WhatMeWorry via
Digitalmars-d-learn wrote:
[...]
Just put it in a separate module and then import it. e.g.
file: mypackage/constants.d
On Saturday, 22 October 2016 at 21:34:36 UTC, WhatMeWorry wrote:
On Saturday, 22 October 2016 at 20:51:14 UTC, Jonathan M Davis
wrote:
[...]
Ok, but now I'm getting these error in my new
mypackage/constants.d
..\common\vertex_data.d(5,15): Error: undefined identifier
'GLfloat'
On Saturday, October 22, 2016 21:34:36 WhatMeWorry via Digitalmars-d-learn
wrote:
> Ok, but now I'm getting these error in my new
> mypackage/constants.d
>
> ..\common\vertex_data.d(5,15): Error: undefined identifier
> 'GLfloat'
> ..\common\vertex_data.d(53,12): Error: undefined identifier 'vec3'
On Saturday, 22 October 2016 at 20:51:14 UTC, Jonathan M Davis
wrote:
On Saturday, October 22, 2016 20:35:27 WhatMeWorry via
Digitalmars-d-learn wrote:
[...]
Just put it in a separate module and then import it. e.g.
file: mypackage/constants.d
==
module mypackage.constants;
On Saturday, October 22, 2016 20:35:27 WhatMeWorry via Digitalmars-d-learn
wrote:
> This is probably so simple that there's no example anywhere.
>
> Basically, I've got a huge array definition (see below) which I
> reuse over and over again in different projects.
>
> GLfloat[] vertices =
> [
>
This is probably so simple that there's no example anywhere.
Basically, I've got a huge array definition (see below) which I
reuse over and over again in different projects.
GLfloat[] vertices =
[
// Positions // Texture Coords
-0.5f, -0.5f, -0.5f, 0.0f, 0.0f,
0.5f,
On Sunday, 9 October 2016 at 01:24:57 UTC, WhatMeWorry wrote:
I've got a little hello_window DUB project which uses these
dependencies:
dependency "derelict-util" version="~>2.0.6"
dependency "derelict-glfw3" version="~>3.1.0"
dependency "derelict-gl3" version="~>1.0.19"
dependency
On 09/10/2016 2:24 PM, WhatMeWorry wrote:
I've got a little hello_window DUB project which uses these dependencies:
dependency "derelict-util" version="~>2.0.6"
dependency "derelict-glfw3" version="~>3.1.0"
dependency "derelict-gl3" version="~>1.0.19"
dependency "derelict-fi"
I've got a little hello_window DUB project which uses these
dependencies:
dependency "derelict-util" version="~>2.0.6"
dependency "derelict-glfw3" version="~>3.1.0"
dependency "derelict-gl3" version="~>1.0.19"
dependency "derelict-fi"version="~>2.0.3"
dependency "derelict-ft"
On Tuesday, 4 October 2016 at 13:16:35 UTC, Adam D. Ruppe wrote:
I'd put your repeated variables together in a struct, then pass
it around to the functions. At least then you pass just one
param at a time, without losing the info.
That's not a bad idea.
I have been creating "ids" to point to
I'd put your repeated variables together in a struct, then pass
it around to the functions. At least then you pass just one param
at a time, without losing the info.
Howdy folks
This might be a really stupid question, but ya know, if you don't
ask ...
So, anytime I am calling a function, I have to include everything
that the function needs all the time. My simplistic example is:
#!/usr/bin/rdmd
import std.stdio;
void test(string firstinput, string
On Sunday, 25 September 2016 at 00:52:26 UTC, Mike Parker wrote:
On Saturday, 24 September 2016 at 16:51:47 UTC, WhatMeWorry
wrote:
[...]
As long as they're public. Imports are private by default,
meaning their symbols are only visible locally. Change it to:
module derelict_libraries;
On Saturday, 24 September 2016 at 16:51:47 UTC, WhatMeWorry wrote:
My app.d has:
module app;
import common.derelict_libraries;
and derelict_libraries.d has:
module derelict_libraries;
import derelict.glfw3.glfw3;
import derelict.opengl3.gl3;
It's fine to import other imports, Right?
As
On Saturday, 24 September 2016 at 02:33:22 UTC, WhatMeWorry wrote:
I see that dub has all the .d import files already placed in
C:\Users\Me\AppData\Roaming\dub\packages\derelict-gl3-1.0.19\derelict-gl3\source\derelict\opengl3
and
On 24/09/2016 2:33 PM, WhatMeWorry wrote:
I have D opengl/glfw3 program that I wrote which compiles and runs fine,
but I always felt it was a bit of a Visual Studio hack. So I thought
I'd start anew but this time use dub from the get go. So I did dub
int...etc. And put my existing code into
I have D opengl/glfw3 program that I wrote which compiles and
runs fine, but I always felt it was a bit of a Visual Studio
hack. So I thought I'd start anew but this time use dub from
the get go. So I did dub int...etc. And put my existing code
into the app.d file. But when I try to
On 9/21/16 3:38 AM, Suliman wrote:
On Wednesday, 21 September 2016 at 07:09:01 UTC, rikki cattermole wrote:
On 21/09/2016 7:06 PM, Suliman wrote:
It's seems that __treats is language keyword that help to get info from
compile-time. But there is also lib named std.traits
and I can't understand
On 21/09/2016 7:38 PM, Suliman wrote:
On Wednesday, 21 September 2016 at 07:09:01 UTC, rikki cattermole wrote:
On 21/09/2016 7:06 PM, Suliman wrote:
It's seems that __treats is language keyword that help to get info from
compile-time. But there is also lib named std.traits
and I can't
On Wednesday, 21 September 2016 at 07:09:01 UTC, rikki cattermole
wrote:
On 21/09/2016 7:06 PM, Suliman wrote:
It's seems that __treats is language keyword that help to get
info from
compile-time. But there is also lib named std.traits
and I can't understand difference
On 21/09/2016 7:06 PM, Suliman wrote:
It's seems that __treats is language keyword that help to get info from
compile-time. But there is also lib named std.traits
and I can't understand difference
https://dlang.org/spec/traits.html
https://dlang.org/phobos/std_traits.html
Could you explain
It's seems that __treats is language keyword that help to get
info from compile-time. But there is also lib named std.traits
and I can't understand difference
https://dlang.org/spec/traits.html
https://dlang.org/phobos/std_traits.html
Could you explain the difference?
On Thursday, 18 August 2016 at 03:54:24 UTC, WhatMeWorry wrote:
When I saw the .dll in OpenGL.dll, I immediately thought: just
Windows. But does this hold true for the linux shared opengl
libraries as well? Is this why DerelictGL3.reload() does not
take a path argument. But then why
On Thursday, 18 August 2016 at 03:11:17 UTC, WhatMeWorry wrote:
On Wednesday, 17 August 2016 at 23:21:59 UTC, Rene Zwanenburg
wrote:
On Wednesday, 17 August 2016 at 22:59:31 UTC, WhatMeWorry
wrote:
I want to store all my shared/dynamic libraries within a
special directory relative to where the
On Wednesday, 17 August 2016 at 23:21:59 UTC, Rene Zwanenburg
wrote:
On Wednesday, 17 August 2016 at 22:59:31 UTC, WhatMeWorry wrote:
I want to store all my shared/dynamic libraries within a
special directory relative to where the application directory
is. All of the derelictXX.loads(path)
On Wednesday, 17 August 2016 at 22:59:31 UTC, WhatMeWorry wrote:
I want to store all my shared/dynamic libraries within a
special directory relative to where the application directory
is. All of the derelictXX.loads(path) compiles except
DerelictGL3.reload(lib); which doesn't seem to be
On Wednesday, 10 August 2016 at 23:32:54 UTC, WhatMeWorry wrote:
Afterall, isn't that the definition of a string? So what's up
with the two groupings of single quotes?
http://www.howtogeek.com/howto/29980/whats-the-difference-between-single-and-double-quotes-in-the-bash-shell/
On 08/10/2016 04:32 PM, WhatMeWorry wrote:
string pwdxCommand = escapeShellCommand("pwdx", to!string(pid));
writeln("pwdxCommand = ", pwdxCommand);
Output:
Current process ID: 7962
pwdxCommand = 'pwdx' '7962'
I'm confused as to why the writeln statement didn't output "pwdx 7962"?
string pwdxCommand = escapeShellCommand("pwdx", to!string(pid));
writeln("pwdxCommand = ", pwdxCommand);
Output:
Current process ID: 7962
pwdxCommand = 'pwdx' '7962'
I'm confused as to why the writeln statement didn't output "pwdx
7962"?
Afterall, isn't that the definition of a
Am 02.08.2016 um 00:47 schrieb Seb:
> On Monday, 1 August 2016 at 08:53:30 UTC, Kagamin wrote:
>> A bug.
>
> ... which should be filled at Bugzilla and/or fixed. Thanks! :)
I created a pullrequest: https://github.com/dlang/phobos/pull/4720
On Monday, 1 August 2016 at 08:53:30 UTC, Kagamin wrote:
A bug.
... which should be filled at Bugzilla and/or fixed. Thanks! :)
A bug.
byte buffer to the decode function.
But the decodeLength function returns 33 for the encoded data, so when
calling decode with a 32 byte buffer, the in contract fails. The funny
thing is, when using a release build (and thus removing all contracts)
everything works as expected.
So my question
So my last variant is right?
How can I inspect code, to better understand how GC works? Also
where I can find idiomatic code with comments? Just to read for
better understand design solutions.
On Thursday, 28 July 2016 at 15:24:22 UTC, Dechcaudron wrote:
Also, I'm assuming what I said about calling destroy(instance)
is as correct as calling a cleanup method?
Class destructor also automatically calls destructors of struct
members of the class.
On Thursday, 28 July 2016 at 15:24:22 UTC, Dechcaudron wrote:
On Thursday, 28 July 2016 at 15:18:24 UTC, Lodovico Giaretta
wrote:
3) at program end, live objects are not scheduled for
finalization;
4) at program end, pending finalizations from previous
collections may not be run.
I didn't
On Thursday, 28 July 2016 at 15:02:58 UTC, Dechcaudron wrote:
On Thursday, 28 July 2016 at 14:43:32 UTC, Lodovico Giaretta
wrote:
No! Never run important finalization in a class destructor!
The GC is not obliged to run the destructors, so you may end
up with your objects destroyed but the
On Thursday, 28 July 2016 at 15:18:24 UTC, Lodovico Giaretta
wrote:
3) at program end, live objects are not scheduled for
finalization;
4) at program end, pending finalizations from previous
collections may not be run.
I didn't know these two, can I get source on them?
Also, I'm assuming
On Thursday, 28 July 2016 at 14:24:16 UTC, Suliman wrote:
void dbInsert(string login, string uploading_date, string
geometry_type, string data)
{
Statement stmt = conn.createStatement();
//stmt.executeUpdate("...");
// some processing of
On Thursday, 28 July 2016 at 14:43:32 UTC, Lodovico Giaretta
wrote:
No! Never run important finalization in a class destructor! The
GC is not obliged to run the destructors, so you may end up
with your objects destroyed but the connections still open. For
this kind of important things, you
On Thursday, 28 July 2016 at 14:33:26 UTC, Dechcaudron wrote:
On Thursday, 28 July 2016 at 14:01:45 UTC, Suliman wrote:
2. Should I call destructor and how it's should like?
You certainly want to close the connection to the db.
Basically, the destructor is intended to free resources such as
I don't know anything about the driver you are using, but from my
general experience with DBs I'll try to give you some insight.
On Thursday, 28 July 2016 at 14:01:45 UTC, Suliman wrote:
1. Should declaration of them be field of class?
I'd say so. If you intend to use each instance of the
class GDB
{
Config config;
MySQLDriver driver;
DataSource ds;
Connection conn;
this(Config config)
{
this.config = config;
driver = new MySQLDriver();
string[string] params;
string url =
I have for next queston.
For example I have class for working with DB (I am using ddbc
driver). I put some variables as class fields, and init them in
constructor:
class GDB
{
Statement stmt;
Config config;
MySQLDriver driver;
DataSource ds;
On 07/26/2016 06:41 AM, Richard wrote:
From http://wiki.dlang.org/Operator_precedence
In case it's useful to others, I explain that table a little bit here
(associativity, unordered operators, and the precedence of =>):
http://ddili.org/ders/d.en/operator_precedence.html
Ali
On Tuesday, July 26, 2016 13:41:39 Richard via Digitalmars-d-learn wrote:
> On Tuesday, 26 July 2016 at 13:19:54 UTC, ag0aep6g wrote:
> > Operator precedence is different from what you think. `a ? b :
> > c = d` means `(a ? b : c) = d`. But you want `a ? b : (c = d)`.
> > So you need parentheses
On Tuesday, 26 July 2016 at 13:19:54 UTC, ag0aep6g wrote:
Operator precedence is different from what you think. `a ? b :
c = d` means `(a ? b : c) = d`. But you want `a ? b : (c = d)`.
So you need parentheses around `p+=1`.
Or just go with `if` and `else`. It's clearer anyway.
From
On 07/26/2016 03:09 PM, Richard wrote:
if(n%p==0)
n/=p;
else
p+=1;
[...]
However, if I replace the content of the for loop with the ?: operator,
the program is not
correct anymore (largestPrimeFactor(4) now returns 3):
[...]
n%p==0 ? n/=p :
On Tuesday, 26 July 2016 at 13:17:27 UTC, Adam D. Ruppe wrote:
(n%p==0) ? n/=p : p+=1 ;
And actually, using ?: with /= and += is kinda bizarre.
I think you are better off leaving this as if/else since the
point of this is the assignment rather than the return value.
On Tuesday, 26 July 2016 at 13:09:28 UTC, Richard wrote:
n%p==0 ? n/=p : p+=1 ;
Try
(n%p==0) ? n/=p : p+=1 ;
I'm pretty sure the order of operations (precedence rules) puts
?: above ==.
On Tuesday, 26 July 2016 at 13:09:28 UTC, Richard wrote:
Hello all,
try using some parentheses:
(n%p==0) ? (n/=p) : (p+=1) ;
Hello all,
I've got a program that correctly computes the largest factor in
the prime decomposition of a positive number:
*
import std.math std.stdio;
ulong largestPrimeFactor(ulong n) {
for(ulong p=2; p<=sqrt(cast(real)n); ) {
On Tuesday, 26 July 2016 at 12:13:02 UTC, DLearner wrote:
What is the recommended way of identifying which assert has
been triggered?
If you compile with -g, run the program in a debugger. It will
tell you.
If you compile and do NOT use -release, the error message
automatically printed by
On 7/26/16 8:13 AM, DLearner wrote:
Suppose a program contains several points that control should not get to.
So each such point is blocked by assert(0).
What is the recommended way of identifying which assert has been triggered?
Is one allowed anything like 'assert(0,"Crashed at point A");',
Suppose a program contains several points that control should not
get to.
So each such point is blocked by assert(0).
What is the recommended way of identifying which assert has been
triggered?
Is one allowed anything like 'assert(0,"Crashed at point A");',
where the message goes to stderr?
On Saturday, 9 July 2016 at 21:12:24 UTC, WhatMeWorry wrote:
foreach( i, str; myClassMembers)
What are you doing to get myClassMembers?
If it is __traits(allMembers), it just gives you the *names* of
the members. To get the actual thing, you then do
__traits(getMember, object, str) and can
class C
{
this(){ _i = 0; _j = 0; }
void setVar(int i) { _i = i; }
int getVar() { return _i; }
int _i;
int _j;
}
writeln("C");
foreach( i, str; myClassMembers)
{
writeln("member ", i, " = ", str);
TypeInfo ti = typeid(str);
writeln("type id is ", ti);
On Saturday, 21 May 2016 at 22:11:30 UTC, chaseratx wrote:
On Saturday, 21 May 2016 at 22:08:15 UTC, Era Scarecrow wrote:
On Saturday, 21 May 2016 at 21:54:43 UTC, Era Scarecrow wrote:
On Saturday, 21 May 2016 at 21:47:20 UTC, chaseratx wrote:
Thanks Era, but I am not trying to fix the range
On Saturday, 21 May 2016 at 22:08:15 UTC, Era Scarecrow wrote:
On Saturday, 21 May 2016 at 21:54:43 UTC, Era Scarecrow wrote:
On Saturday, 21 May 2016 at 21:47:20 UTC, chaseratx wrote:
Thanks Era, but I am not trying to fix the range error. That
was put there intentionally to create stderr
On Saturday, 21 May 2016 at 21:54:43 UTC, Era Scarecrow wrote:
On Saturday, 21 May 2016 at 21:47:20 UTC, chaseratx wrote:
Thanks Era, but I am not trying to fix the range error. That
was put there intentionally to create stderr output. I'm
trying to figure out how to get ALL stderr output
701 - 800 of 1857 matches
Mail list logo