Errors, bugs, questions - page 2503

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
So what's the bug?
You declare an array of two elements with two bytes each and get 4 bytes as it should be. Where is the bug? What is it?
It's this.
You align it to 4 and 2 elements will occupy 2*8 bytes.
Sorry, but if you write that, you don't understand the subject.
Analogous to the crosses:
The mistake probably isn't here?
I'm sorry, but if you write that, you don't understand the subject.
No, you don't seem to understand.
No, you don't seem to understand.
The #pragma pack from the smallmicrosoft stuff is a very peculiar thing (the way it works now surprises me, to be honest). Not surprisingly, the standard alignas works differently.
Here's more:
The #pragma pack of the small softwares is a very peculiar thing (the way it works is surprising to me now, to be honest). No wonder that alignas works differently in the standard.
come on )
#pragma pack works fine on gcc as well, and what you wrote is just an internal gcc attribute that works differently than aligned.
Come on, already.)
#pragma pack works fine on gcc as well, and what you've written is just an internal gcc attribute that works differently than aligned.
So what does this example show? That you haven't figured out the use of alignas? Even the compiler swears at the code:
The #pragma pack is an odd little softie creation that gcc only supports for compatibility.
So what does this example show? That you haven't figured out how to use alignas?
I agree, I messed up.
Here's the right code.
so alignas is not analogous to packaging.
because in the same gcc (so that without smallsoft) the default multiple of packing is 8
because:
but with alignas(8)
And note that this is default behavior, not for smallmicrosoft compatibility
I don't get the idea. Everything is fine in the example, I don't see a problem. Default - structure alignment == take the strictest requirement-alignment among members.
struct {char;} == 1, struct {char;short} == 2, struct {char;int} == 4, etc. It's like that everywhere. And long long == eight, so alignas has no effect.
I don't get the idea. Everything is fine in the example, I don't see the problem.
Yes, you're right, the example is no indicator.
The bottom line is that mql pack works as #pragma pack and not alignas.