Jump to content

  • Log In with Google      Sign In   
  • Create Account

BitMaster

Member Since 08 Aug 2000
Offline Last Active Yesterday, 07:43 AM

Posts I've Made

In Topic: Data alignment on ARM processors

Yesterday, 05:23 AM

*((unsigned char*)(&result)) = *offset;

Watch out for compiler optimisations breaking code like this (called type punning). It breaks the language aliasing rules. See this link:

http://stackoverflow.com/questions/20922609/why-does-optimisation-kill-this-function/20956250#20956250


Except this is irrelevant since the char-types are explicitly allowed to do this.

In Topic: Islamaphobia in the United States

Yesterday, 04:29 AM

Islamists[...]Islamists[...]Islamists[...]


Is it possible you are completely clueless about the meaning of the word 'Islamist', especially in the way it is distinct from Muslim?

In Topic: Which alignment to use?

Yesterday, 01:30 AM

[...] if your Component types are not strictly PODs (as in is_pod_v<Component> == true).


Correct me if I'm wrong, but isn't the check for PODs too strong? std::is_trivially_copyable_v should be enough.

In Topic: std::sort corrupts my memory

20 April 2016 - 06:21 AM

Then you either use an extremely ancient version of the compiler or you can just write
std::vector<std::pair<float,SMyStruct>>
without extra spaces between template closing brackets.

In Topic: "Timer undeclared identifier" Is my compiler drunk? o.o

18 April 2016 - 12:18 PM

The code you show in post #4 includes Time.h, not Timer.h.

PARTNERS