πΊπ¦ haxadecimal π«π on Nostr: I found and fixed my most recent C++ issue. It wasn't in the code I was working on at ...
I found and fixed my most recent C++ issue. It wasn't in the code I was working on at all; that just exposed an extremely stupid thing I'd done elsewhere.
Up-casting member pointers to a base type that doesn't have the member in question seems to work fine in GCC, although I think it might officially be UB, and that might be changed to not be UB in C++26 (P0149r3).
Obviously I can only actually dereference the member pointer with the correct object type.
Published at
2025-12-04 04:42:50 UTCEvent JSON
{
"id": "c714ae5415947f6d32bedf76cad484c52d1360c6c20eecb4e380f1bd90235497",
"pubkey": "858fcef929620f4e21b7979ad1bf52a1cc2305b61413fb504080a4d779395aab",
"created_at": 1764823370,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.social/@brouhaha/115659464408610349",
"web"
],
[
"proxy",
"https://mastodon.social/users/brouhaha/statuses/115659464408610349",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://mastodon.social/users/brouhaha/statuses/115659464408610349",
"pink.momostr"
],
[
"-"
]
],
"content": "I found and fixed my most recent C++ issue. It wasn't in the code I was working on at all; that just exposed an extremely stupid thing I'd done elsewhere.\nUp-casting member pointers to a base type that doesn't have the member in question seems to work fine in GCC, although I think it might officially be UB, and that might be changed to not be UB in C++26 (P0149r3).\nObviously I can only actually dereference the member pointer with the correct object type.",
"sig": "cc9d0156d62b5026a533c1114b08934b0dae0be100a91a41f35bf0a9ba485dffd28d6326a8cd0ebe37dd9077e779401f11414e487e32e71d2ca492dd28b2f94a"
}