Trass3r:
> So those align(4)s are completely useless since the default alignment is
> chosen anyways?
On 64 bit CPUs/systems the alignment can be 8, so if you ask for 4 you get 4
instead of 8.
> This is just as I would expect but this leaves no chance to specify
> alignment for individual m
> I suggest you to print the .alignof attribute of all your members in your
> experiments, so you can answer to your own questions in a quick way.
I meant the .offsetof attribute, sorry.
Steven Schveighoffer Wrote:
> However, it surprisingly is less optimal for rvalues to pass by ref.
So what? It just must work. Efficiency of a particular operation doesn't mean
efficiency of a program: it can use lvalues most of time.
> D's solution is to use auto ref, but I think your attempts
On Thu, 03 Jun 2010 09:09:39 -0400, Kagamin wrote:
Steven Schveighoffer Wrote:
However, it surprisingly is less optimal for rvalues to pass by ref.
So what? It just must work. Efficiency of a particular operation doesn't
mean efficiency of a program: it can use lvalues most of time.
Usi
You can use another design: feed your control with your items collection and
interface like
string opIndex(size_t item, size_t subItem);
string opIndexAssign(size_t item, size_t subItem, string newValue);
void sort(size_t subItem, bool asc=true);
which will be used by the control to present the
Steven Schveighoffer Wrote:
> But Andrei feels very strongly that passing temporaries via const ref is a
> complete mess in C++, so you'll have to convince him.
If the issue is not performance, it shouldn't be mentioned from the start.
On Thu, 03 Jun 2010 09:47:19 -0400, Kagamin wrote:
Steven Schveighoffer Wrote:
But Andrei feels very strongly that passing temporaries via const ref
is a
complete mess in C++, so you'll have to convince him.
If the issue is not performance, it shouldn't be mentioned from the
start.
*M
Kagamin:
> auto ref works only for return values,
In most cases seems to work with (input) arguments too.
Bye,
bearophile
Yao G.:
> I think the idea of a memory pool or freelist is good. Can you point me
> where can I see your libs?
Instead of just giving you a link to the dlibs1, I've extracted the relevant
code and adapted it to D2:
http://codepad.org/Ug5Z5qum
I have tested it enough with D1 but only a bit with
Thanks bearophile. I'll give it a try later.
--
Yao.G
On Thu, 03 Jun 2010 12:27:20 -0500, bearophile
wrote:
Yao G.:
I think the idea of a memory pool or freelist is good. Can you point me
where can I see your libs?
Instead of just giving you a link to the dlibs1, I've extracted the
re
bearophile Wrote:
> Kagamin:
> > auto ref works only for return values,
>
> In most cases seems to work with (input) arguments too.
>
I'm affraid, it works by ignoring auto attribute.
11 matches
Mail list logo