uis on Nostr: This is from accepted C++20 proposal: ``` union pony { double celestia = 0.; short ...
Published at
2024-07-08 08:14:29Event JSON
{
"id": "49a46d2cca019dd669f35a4d8e2276a0ca9a09edbff1318662dd323d72a4a918",
"pubkey": "7da1a70cc0a5e7d1a74c40b309d16aa44c1b8ef9a2166081e8c088aab4d5a23a",
"created_at": 1720426469,
"kind": 1,
"tags": [
[
"proxy",
"https://pone.social/users/uis/statuses/112749869080186911",
"activitypub"
]
],
"content": "This is from accepted C++20 proposal:\n\n```\nunion pony {\n double celestia = 0.;\n short luna; // padded\n};\natomic\u003cpony\u003e princesses = ATOMIC_VAR_INIT({});\n\nbool party(pony desired) {\n pony expected;\n return princesses.compare_exchange_strong(expected, desired);\n}\n```\n\nhttps://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0528r3.html",
"sig": "e4c50720a6061d5e0d4a4f7b27a5216bee2fbaf393ff86905c949720e8ff1a0107a8a86ea4c4540e90c992129216fc61f9f0c68d8439addd065e2c987f352229"
}