Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Struct memory ordering
//clang 6.0.0 #include <iostream> struct MyStruct { void* pPtr; uint64_t u1; uint32_t u2; }; union Key32 { MyStruct s; uint32_t u; }; int main() { MyStruct s = { nullptr, 0xFF, 0xEE }; s.pPtr = (void*)0xFFFFFFFFEEEEEEEE; Key32 k; k.s = s; std::cout << k.u << std::endl; std::cout << "Hello, world!\n"; }
run
|
edit
|
history
|
help
0
Apple is not convertible to itself (clang 3.8.0)
selection sort
Test3
Throttle Example using circular queue (push all but 2 less than maxSize; then pop all but 2 less than current size)
Tilted uniform distribution random number generator over min/max range
Clang-IsBaseOf
pack expansion
10226
applidiumResto_corrigé
problem_name_1