June 2018 Update

This commit is contained in:
Ingy döt Net 2018-06-22 20:57:24 +00:00
parent ba8067c3b7
commit 22f33d4004
5278 changed files with 84726 additions and 14379 deletions

View file

@ -1 +1,3 @@
int& i = *(int*)0xA100;
#include <memory>
int i;
auto address_of_i = std::addressof(i);

View file

@ -1,5 +1 @@
static union
{
int i;
int j;
};
int& i = *(int*)0xA100;

View file

@ -1,2 +1,3 @@
int i;
int& j = i;
#include <new>
struct S { int i = 0; S() {} };
auto& s = *new (reinterpret_cast<void*>(0xa100)) S;

View file

@ -0,0 +1,5 @@
static union
{
int i;
int j;
};

View file

@ -0,0 +1,2 @@
int i;
int& j = i;

View file

@ -0,0 +1,4 @@
#include <cstring>
inline float read_as_float(int const& i) { float f; memcpy(&f, &i, sizeof(f)); return f; }
int i = 0x0a112233;
float f = read_as_float(i);