BCS wrote:
I need a function that works like the following:
T* New(T)() { return new T; }
But that also works with static arrays:
auto i = New!(int)();
auto a = New!(int[27])();
The cleanest solution I can think of is:
T* New(T)() { return (new T[1]).ptr; }
but that seems ugly. Any id
Ellery Newcomer wrote:
On 02/24/2010 12:37 PM, Robert Clipsham wrote:
On 24/02/10 17:51, Ellery Newcomer wrote:
import tango.core.tools.TraceExceptions;
If you want to use gdb then type 'b _d_throw_exception' (or 'b
_d_throw'
for dmd) before you run your app. This will break on eve
Steven Schveighoffer wrote:
On Mon, 22 Feb 2010 09:27:57 -0500, strtr wrote:
Thanks, I understand.
But, how about a runtime error?
Isn't a literal placed in easy to identify should-only-read memory?
A segfault is a runtime error. The problem with Windows is it doesn't
throw an error on writ
Don wrote:
Trass3r wrote:
Why isn't == used to compare the struct members in the code above? I
mean, if I compare the structs with == it could also use == to
compare the members. If I use "is" to compare the structs it could
use "is" to compare them members.
Structs are compared *bitwise*!
Trass3r wrote:
grauzone schrieb:
Second, the bug: casting arrays at compiletime seems to behave
differently from casting at runtime. Casting at compiletime doesn't
reinterpret cast, it does conversion! Demonstration here:
http://codepad.org/OGjXADdu
Feel free to file some bug re
The Anh Tran wrote:
This is just a small D exercise. I port c++ knucleotide from
shootout.alioth.debian.org
Issue 1:
If i manually listing hashtable contents, the key does exist in that ht.
But (key in hash_table) always yield null.
Worse, if i use: "auto val = ht[key]", an exception is thrown
bearophile wrote:
(I have recently seen a 13X speedup in a not synthetic program just modifying how memory is used and reducing memory usage, keeping the same algorithm. I can show you an URL if you want).
Yes, please do!
Do you know how can Free Pascal use so little RAM? Here in this nbody b
teo wrote:
There was a way to define new types within templates and I think that I
have seen that demonstrated here in the newsgroups, but cannot find it
now. Can someone help me please?
I would like to do something like this:
template MyTemplate(T)
{
struct T ~ "Struct" // define FooStruc
Trass3r wrote:
I got some RGB palette in a byte array which I'd like to convert or
"map" to an RGB struct array, isn't this easily possible without using
dozens of struct constructors?
RGB[256] PALETTE = cast(RGB[256]) [
0x00, 0x00, 0x00, 0xE3, 0x53, 0x00,
0xCF, 0x4B, 0x07, 0xBF, 0x43
bearophile wrote:
Steven Schveighoffer:
If I have 2 identical floating point values, how do I ensure they are
binary equivalents of eachother?
Try this inside std.math of Phobos2:
bool isIdentical(real x, real y);
I thought 'a is b' would work, but it just morphs into a == b, which isn't
Tomek Sowiński wrote:
Amusing things happen when immutable arguments and circular imports are
put together:
--
module hello;
import test;
struct Strukt {
Staly* s;
}
--
module test;
import hello;
immut
Mike L. wrote:
I'm making a class template that only works with strings, so I thought it'd be
good to instantiate each template with char, wchar, and dchar right in the
template's module so that when it's compiled it'll be part of the .obj file and
won't have to compile it for every other proj
Phil Deets wrote:
On Wed, 11 Nov 2009 13:34:32 -0500, Phil Deets wrote:
On Wed, 11 Nov 2009 13:30:17 -0500, Phil Deets
wrote:
On Wed, 11 Nov 2009 08:50:48 -0500, bearophile
wrote:
In a C program I have a numeric constant SIZE (that is in [1,32]),
that I can define when I compile the co
Joel Christensen wrote:
grauzone wrote:
Joel Christensen wrote:
FMOD sound (record and play) is off D Programming web site.
http://wiki.dprogramming.com/FMod/HomePage
I followed instructions from the web site. But one instruction said
to use 'coffimplib.exe' but I couldn't
Joel Christensen wrote:
FMOD sound (record and play) is off D Programming web site.
http://wiki.dprogramming.com/FMod/HomePage
I followed instructions from the web site. But one instruction said to
use 'coffimplib.exe' but I couldn't see where it is to download it, and
one link wasn't found (
al wrote:
It seems that unittests are not run (I've tried putting while(1){} and writef()
there - no effect).
Even this code doesn't run assert():
import std.stdio;
int main(string[] args)
{
assert(args.length == -1);
writef("shouldn't work!");
return 0;
}
I'm using:
Zarathustra wrote:
I would like to know, how to override function if subclass and super class are
located in the same package and different modules.
For instance when they are in the same module:
//___
module main;
class Foo{
this(){
proc();
}
void
Saaa wrote:
public void addToAA(char[] var_name, KT, ET)(KT key, ET element)
{
mixin(ET.stringof~`[]* elements = key in `~var_name~`;`);
if( elements == null )
{
ET[] temp;
temp.length = 1;
temp[0] = element;
mixin(var_name~`[key] = temp;`);
}
else
{
(*elements).le
Justin Johansson wrote:
grauzone Wrote:
Justin Johansson wrote:
How does one determine the sizeof (in bytes) of an instance of a class in D?
.sizeof works as advertised for structs, but for reference types,
.sizeof yields the sizeof the referencing variable (effectively same as size of
a
Justin Johansson wrote:
How does one determine the sizeof (in bytes) of an instance of a class in D?
.sizeof works as advertised for structs, but for reference types,
.sizeof yields the sizeof the referencing variable (effectively same as size of
a pointer)
and not the size of the underlying in
Daniel Keep wrote:
I found a solution.
See
http://stackoverflow.com/questions/335928/linux-gcc-linking-ld-cannot-find-a-library-that-exists
For me, I needed readline and history, so I did this:
$ cd /lib
$ sudo ln -s libreadline.so.5 libreadline.so
$ sudo ln -s libhistory.so.5 libhistory.so
A
Nick Sabalausky wrote:
I can't seem to get that to work. Tried all sorts of stuff. Off the top of
my head:
-ll
This should work. If the lib is named "libsomething", don't include the
"lib": -llsomething
Excluding the "lib" seems to be standard on Unix-like OSes.
-ll.so
"-L-l "
"-L-l .so"
notna wrote:
grauzone schrieb:
md5_example_2.d(7): expression expected, not 'auto'
md5_example_2.d(7): found 'len' when expecting ')'
md5_example_2.d(7): found '=' instead of statement
(this is line 7 after I removed comments and blank lines from
downs wrote:
Stewart Gordon wrote:
downs wrote:
while (auto len = file.readBlock(buffer.ptr, buffer.sizeof))
md5_example_2.d(7): expression expected, not 'auto'
md5_example_2.d(7): found 'len' when expecting ')'
md5_example_2.d(7): found '=' instead of statement
(this is line 7 after I rem
#ponce wrote:
Stewart Gordon Wrote:
My recollection of reading the spec is that a D compiler is allowed to
optimise by assuming no pointer aliasing. But I can't remember at the
moment where I read this.
I don't know if this is neat or nasty for a compiler to do so.
OT : Is there a DMD swi
div0 wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Jérôme M. Berger wrote:
Max Samukha wrote:
Tom S wrote:
Max Samukha wrote:
COFF/ELF output would not be that bad though, at least if there's some
linker that supports these *and* its license allows it to be bundled
with DMD.
I doubt s
I wouldn't be surprised if W himself has forgotten about this rule,
since other parts of the spec make no mention of it, or seem to depend
on the default-initialization of variables.
"If the Initializer is void, however, the variable is not initialized.
If its value is used before it is set, unde
Jarrett Billingsley wrote:
On Sun, Aug 30, 2009 at 12:24 AM, Ary Borenszweig wrote:
Steven Schveighoffer escribió:
On Sat, 29 Aug 2009 20:15:55 -0400, Ellery Newcomer
wrote:
void blah(out bool a = false){
// blah blah blah
}
compile time use of blah results in error.
Am I doing anything w
bearophile wrote:
Lars T. Kyllingstad:
I think the compiler should be smart enough to figure this out for
itself, but until that happens you can work around it by suffixing at
least one of the integer literals with LU, so the compiler interprets
the entire expression as an ulong:
To make thi
bearophile wrote:
I don't know much C++. Can CRTP be used in D1 too, to improve the performance
of some D1 code?
http://en.wikipedia.org/wiki/Curiously_Recurring_Template_Pattern
Why don't you just go and try?
If you hit forward referencing errors when using structs, try classes
with final m
Ali Cehreli wrote:
Lars T. Kyllingstad Wrote:
I've tried with DMD 2.031, and I can't reproduce this. This works fine
for me:
int[2] static_0 = [ 1, 1 ]:
int[2] static_1 = [ 1:1 ];
Where did you put the declarations? I've tried putting them at both
module level and in a class, and both
LOOKUP_TABLE[0] = Method("method1", &Component.method1);
LOOKUP_TABLE[1] = Method("method2", &Component.method2);
These two lines are weird. ``pragma(msg)`` shows that type of
``&method1`` is ``void function()`` while it must be ``void delegate()``
for a non-static member beca
Trass3r wrote:
Robert Fraser schrieb:
File is probably too big. Remember that for every byte in your binary,
DMD is likely allocating several hundred for the literal xpression
object + codegen for the expression, etc., and frees very little
dynamically allocated memory.
So we can't even em
Daniel Keep wrote:
Tim Matthews wrote:
Kagamin wrote:
Tim Matthews Wrote:
I thought a slice would behave slighty different due to some sort of
meta data that is a separate area of memory so it doesn't effect D's
abi.
Current plan is to introduce new type - array - into the language.
Do yo
Ever heard of recursion?
Why don't you simply handle all types recursively? Why do you need this
"array depth" stuff?
BCS wrote:
Hello grauzone,
http://groups.google.com/group/net.lang.c/msg/66008138e07aa94c
Many people (even Brian Kernighan?) have said that the worst feature
of C is that switches don't break automatically before each case
label.
Oh god, that's from 1984, and even today we
http://groups.google.com/group/net.lang.c/msg/66008138e07aa94c
>Many people (even Brian Kernighan?) have said that the worst feature
of C is that switches don't break automatically before each case label.
Oh god, that's from 1984, and even today we're struggling with this
bullshit in the mos
Saaa wrote:
Hello Saaa,
static if(is(typeof({ /* code to be checked for validity goes here */
}))) ...
How does that piece of code work anyways :D
that checks to see if the {...} is a valid delegate literal by using is()
to see if semantic checks fail.
Ah, I see. Can this be done at runt
Robert Fraser wrote:
> Jarrett Billingsley wrote:
>> On Wed, May 27, 2009 at 8:55 PM, Robert Fraser
>> wrote:
>>> Hi all,
>>>
>>> Quick question: I want to use some unicode identifiers, but I get
>>> "unsupported char 0xe2", both with using and not using a BOM. The characters
>>> in question are t
reimi gibbons wrote:
if i encapsulate a part of statements within function with synchronized keyword
and then let says 1 thread is calling the function, then another thread try to
access it, will d put the later thread to wait (sleep) until the 1st call
finished it or it will signal failure to
Dan wrote:
That sounds great, and seems like yet another reason for me to switch to D
(other than the removal of header files which always seemed like a kludge).
I heard that the compiler can change the padding bytes to non-null on
some occasions. For example, the compiler could treat member
Dan wrote:
Structs can't easily be compared in C because of potential 'padding' inside the
struct which may (or may not) exist.
I was jut wondering if D somehow gets round this, and allows something like
memcmp to easily compare two structs.
How about using the == operator?
Maybe it's time to put together an instrumented GC...
Wishlist:
- some way to know _when_ a collection happened (or how often)
- logging of allocations (module/linenumber of allocator, size of
allocation, type of allocation)
- per TypeInfo allocation statistics
- per module allocation statisti
Wild guess: there's a false pointer, that keeps one element in the list
from being collected, and because the list-prev pointers are still
there, all following elements won't be collected either in consequence.
If I had time, I'd try two experiments:
1. before freeing everything, reset the prev
Dear Saaa, these varargs suck badly and you shouldn't use them. It's so
simple to introduce portability errors or heisenbugs, and it's
incredibly hard to get it right. You're better off with alternatives.
Alternative 1: Typesafe Variadic Functions
Useful if the variadic arguments should have on
int read(/+File inFile = stdin,+/ A...)(out A a) /+Uncommenting results
in: Error: arithmetic/string type expected for value-parameter, not
File+/
That would make inFile a template parameter, which obviously doesn't
make sense with objects, and I guess File is an object. This should work:
int r
Tyro[a.c.edwards] wrote:
I am looking for a D version of scanf() but I'm sure there is no such
thing so I tried contrived one. I am sure I missed a slew of obvious
There's readf() in std.stream. I think you have to use std.cstream : din
to use it with stdin.
int read(/+File inFile = stdin,
Michael P. wrote:
Michael P. Wrote:
Mike Parker Wrote:
Michael P. wrote:
Frits van Bommel Wrote:
Michael P. wrote:
But when I type dmd in the terminal, I get this:
mich...@ubuntu:~$ dmd
bash: /usr/local/bin/dmd: Permission denied
mich...@ubuntu:~$
Do you know why?
Looks like you didn
http://digitalmars.com/d/1.0/expression.html#ImportExpression
It returns a char[], which is a misdesign, because the loaded file can
be binary data as well. I think.
Use
ubyte[] fontbytes = cast(ubyte[])import("yourfont.ttf");
D". Because a D compiler that doesn't use DMD's front-end is not D
compatible. Because the front end *is* the specification of the language.
...and it's full of bugs.
Jarrett Billingsley wrote:
On Tue, Apr 28, 2009 at 10:23 PM, Daniel Keep
wrote:
That requires f to be a type, which loses you the actual names. And you
cannot (last time I checked) have aliases in a tuple.
Check again - tuples can be any arbitrary mix of types, expressions,
and aliases. :)
Jarrett Billingsley wrote:
On Sun, Apr 26, 2009 at 12:23 PM, Jacob Carlborg wrote:
Is it possible to get the name of a function and the names of the function
parameters?
Name of a function? Yes.
public template NameOfFunc(alias f)
{
version(LDC)
const char[] NameOfFu
What's the advantage of doing this? Having quicker startup times?
Syntax. Read the first post of this thread.
bearophile wrote:
grauzone:
the clone method will only copy member b, but not a or c.
A *good* implementation of this function seems fit to be added to Phobos.
And serialization, and a complete reflection API.
Bye,
bearophile
There are two things on my side:
1. Compiler refuses to clone private attributes. I have tried
gdc/gdmd/dmd_v1 in Linux.
It was changed in dmd later, and now you can access private attributes
by using tupleof. I don't know when exactly it was changed, but it
should work at least with dmd 1.039
Qian Xu wrote:
grauzone wrote:
newobject.tupleof[i] = old.tupleof[i];
If the current value of tupleof[i] is an object, the object will be
referenced, won't it?
Shall I write:
auto elem = old.tupleof[i];
static if (is(typeof(elem) == class))
{
newobject.tupleof[i] = clone
grauzone wrote:
Qian Xu wrote:
Hi All,
is there any (easy) way to clone an object or any other classes?
--Qian
Simple answer: No.
Complicated answer: Yes, but you have to write it yourself.
Here's a nice starting point. You can use tupleof to get all members of
a class. Note that
Qian Xu wrote:
Hi All,
is there any (easy) way to clone an object or any other classes?
--Qian
Simple answer: No.
Complicated answer: Yes, but you have to write it yourself.
Here's a nice starting point. You can use tupleof to get all members of
a class. Note that this doesn't deal with s
What exactly are you trying to accomplish?
It seems that you want to use the AA in CTFE, but it doesn't work,
because using AAs with classes as keys don't work in CTFE?
Doctor J wrote:
I'd like to make a compile-time constant associative array mapping a list of
types to an integer:
int[??] typemap;
typemap[(int,float)] = 1;
typemap[(long,double)] = 2;
...
int t = typemap[(int,float)];
I tried playing with std.typetuple but no luck. I can get halfway there w
Not sure what you're actually trying to do, but you can do this:
class Container {
abstract void dostuff();
}
class ContainerSDgsdg(T) : Container {
override void dostuff() {
//can use T here
}
}
Container bla = new ContainerSDgsdg!(int)();
//can pass aro
Qian Xu wrote:
grauzone wrote:
Check if the variable is a pointer, and if yes, dereference it:
alias typeof(i) T;
static if (is(T T2 : T2*)) {
T2 i2 = *i;
Format.convert("{}", i2);
} else {
Format.convert("{}", i);
}
Hi again,
I cannot compile this code
What exactly
Qian Xu wrote:
Hi All,
tango.text.convert.Format provides a nice function to convert anything
to string.
It works perfect except the argument is a pointer type.
It will print the address of a pointer instead of its value
For instance:
int* i = new int;
*i = 1
Jarrett Billingsley wrote:
On Wed, Apr 1, 2009 at 12:01 PM, Trass3r wrote:
I mean it can only be used with dmd 1.x compilers anyway.
else if (strcmp(p + 1, "v1") == 0)
{
#if DMDV1
global.params.Dversion = 1;
#else
error("use DMD 1.0 series compilers for -v1 switch");
break
Trass3r wrote:
Sam Hu schrieb:
I am confused again this time about the key word alias when I read
below tutorial:
http://www.dsource.org/projects/tutorials/wiki/MetaBinarySearch
Let's say this one:
template bSearch(alias Match, alias Fail, alias x, A...) {
const bSearch = bSearchAlg!(0,Matc
Qian Xu wrote:
Hi All,
previously I saw an article about how to dump an object with all properties.
-code---
void log(T)(T obj) {
static if (is(T == struct) || is(T == class)){
writef("{");
foreach(i,_;obj.tupleof) {
writefln("%s : %s,", ob
Jarrett Billingsley wrote:
On Wed, Mar 25, 2009 at 5:00 PM, Jarrett Billingsley
wrote:
On Wed, Mar 25, 2009 at 4:21 PM, Zarathustra wrote:
Have you got any idea how to manipulate LPT port in Windows XP with D?
Um, the same way you'd do it with any other language...?
I mean, if you compute
Jarrett Billingsley wrote:
On Sat, Mar 21, 2009 at 3:45 PM, grauzone wrote:
Also, I noticed that "dsss build -full" seems to be the way to pass this
flag on the command line. But the project is recompiled even when no file
was modified at all. This is not good: it should only re
Brian wrote:
On Sat, 21 Mar 2009 15:44:41 +0100, grauzone wrote:
I'm using dsss (with dmd under Linux) to compile my project, and
build/compile times are reaching unacceptable highs.
out of curiosity, how much code do you actually have? im using D for
something with ~12,000 lines of
I use bud, which builds everything with a single run of dmd, but uses
incremental compilation. If I get linker errors, I just run my cleanup
script and try again. Or add -full to bud's command line.
In my case, this practically always causes linker errors. Of course I
don't know why.
Jarrett Billingsley wrote:
On Sat, Mar 21, 2009 at 2:50 PM, grauzone wrote:
What I need is to make dsss completely recompile the project, even if only a
single source file was modified. This way, no errors should occur, and it
would still be faster than with oneatatime=yes.
-full
Sorry
Christopher Wright wrote:
grauzone wrote:
PS: another thing that possibly would bring a speed gain would be to
make dsss compile the whole project in one run, instead of invoking a
new dmd process for each source file. How do I need to change the
rebuild configuration to achieve this
The closest thing that I know is "dsss build -v"
I'm using dsss (with dmd under Linux) to compile my project, and
build/compile times are reaching unacceptable highs.
What are some tips to speed up the build process?
For example, I could imagine that heavy use of templates and CTFE slows
the compiler down. Maybe string mixins with CTFE on th
Daniel Keep wrote:
Qian Xu wrote:
Hi All,
I want to write an universel toString() method for debugging propose.
However I cannot write in one version. The compiler says error all the time.
Could someone tell me, how to write an universel one?
What I want, is to convert primtive types (int, in
Qian Xu wrote:
Lutger wrote:
s[4] means the fifth element of s[]
s[0..4] is a slice from the first to the fifth, but not including the
fifth element. The last element in a slice is always one past the end
of that slice.
Thank you both.
I have to do math in mind in order to keep my code corre
Brian wrote:
I want to use a chaining system for easy setting of object attributes,
which would work great for a single object, unfortunately derived classes
cannot inherit the chained functions implicitly, whats the best way
around this?
class Base {
int x;
Base foo(int x_) {
Jarrett Billingsley wrote:
On Tue, Feb 24, 2009 at 10:42 PM, Daniel Keep
wrote:
You missed the array literal.
I saw that, but thought that it would be a short[] literal since it's
usually the type of the first argument.
Odd, it works. And properly too.
Could it be because of integer promo
Last time I checked I could even use "override" to... erm, override
methods that had package protection. The compiler didn't even complain,
and I had to find out the hard way that the method wasn't virtual.
Jarrett Billingsley wrote:
On Tue, Feb 17, 2009 at 4:41 AM, KlausO wrote:
Hello,
does the D specification specify how the "end of line" is encoded when you
use wysiwyg strings. Currently it seems to be '\n' on windows
(And I guess it will '\n' on linux, too.).
Is this the intended behaviour ?
bearophile wrote:
Daniel Keep:
void lookup(T)(T[] s, size_t offset)
{
char[] text = *cast(char[]*)(cast(void*)(&s[0]) + offset);
}
I am learning still this topic, but can't this create an aliasing problem, as
in C?
http://www.cellperformance.com/mike_acton/2006/06/understanding_strict_alias
John Reimer wrote:
Hello Zarathustra,
When I trying build dwt-win 3.4.1 I get the following error:
Internal error: ..\ztc\evalu8.c 2093
command line:
dsss build
I using DSSS 0.78, Tango 0.99.7 with DMD 1.033.
OS: Windows XP
Any ideas?
Can you try a more recent compiler... like dmd 1.037?
Qian Xu wrote:
Hi All,
I want to test, if two objects are equal.
The rules are as follows:
1. When both are null, it should return true.
2. When one of them is null, it should return false.
3. When both not null, then compare their values (as two strings)
My test code
--
Jarrett Billingsley wrote:
On Tue, Feb 3, 2009 at 5:54 PM, Matthias Walter
wrote:
Hi there,
I'd like to time some functions using Tango, but only including the really used
CPU-time. StopWatch and the other time functions I've found don't mind on the
CPU usage, which means if I time multiple
I agree. Of course using an interface to call a method always requires a
virtual method call. It's even slower than a virtual method call,
because it needs to convert the interface reference into an object
reference.
But he still could call the method in question directly. Implementing an
int
Jarrett Billingsley wrote:
On Mon, Feb 2, 2009 at 3:11 PM, Chris Nicholson-Sauls
wrote:
Or he's caching some very big/complex parameters in the code he's actually
writing... maybe. That said: do we have any assurance that, were the functor
class tagged as 'final', the call would cease to be vir
Jarrett Billingsley wrote:
On Mon, Feb 2, 2009 at 8:31 AM, Lars Kyllingstad
wrote:
I have some functions for which I want to find the nicest possible
combination of performance and usability. I have two suggestions as to how
they should be defined.
"Classic" style:
real myFunction(real arg
BCS wrote:
Correct me if I'm wrong but I thing that D's opApply is a form of the
Visitor pattern where the calling function's stack frame is the visitor
object.
This just occurred to me. Maybe I've been missing something re the
visitor pattern but I think this make for a nice, cool and easy w
BCS wrote:
Hello Robert,
BCS wrote:
Correct me if I'm wrong but I thing that D's opApply is a form of the
Visitor pattern where the calling function's stack frame is the
visitor object.
This just occurred to me. Maybe I've been missing something re the
visitor pattern but I think this make f
Daniel Keep wrote:
grauzone wrote:
The garbage collector isn't guaranteed to to free and destroy an
unreachable object. That's because the GC is conservative. So if you
want to be sure the object's resources are freed, you have to do it
explicitly.
I think you have two cho
The garbage collector isn't guaranteed to to free and destroy an
unreachable object. That's because the GC is conservative. So if you
want to be sure the object's resources are freed, you have to do it
explicitly.
I think you have two choices:
1. Remove close() from the destructor, and call cl
Charles Hixson wrote:
I replaced BlockFile.close with:
void close()
{ if (bf !is null) delete bf;//bf.close;
bf = null;
}
But that didn't alter the segmentation fault. (Did you try it under D1
or D2?)
Your destructor calls close(), and close() accesses the refe
Is it legal to access private members of a class using tupleof, when
normal access would be illegal?
It is not really clear from the D1.0 specification:
> The .tupleof property returns an ExpressionTuple of all the fields in
> the class, excluding the hidden fields and the fields in the base
>
I think it would really suck to introduce special cases to forbid
default initialization of structs. And assuming T was the type of the
struct, what would T.init do? Or typeid(T).init()?
Use a class instead.
If you really need a struct, you could use a private field, that signals
if the struc
95 matches
Mail list logo