Sonny Bonds on Nostr: What's your favorite way of doing type safe flags in C++? I typically just use some ...
What's your favorite way of doing type safe flags in C++? I typically just use some enum/int combo, but it's not really type safe and you can combine flags from different sets.
#cpp #cplusplus
Published at
2023-11-04 13:24:35Event JSON
{
"id": "cea4821209a16a2a161ea8d81913f23119cd924cf882fad702ac31eded2a5ac9",
"pubkey": "0798e33797ffc7df8014cec0caf1af01a4322689988623d3dc26bd76255e9c7c",
"created_at": 1699104275,
"kind": 1,
"tags": [
[
"t",
"cpp"
],
[
"t",
"cplusplus"
],
[
"proxy",
"https://mastodon.gamedev.place/users/SonnyBonds/statuses/111352497767383661",
"activitypub"
]
],
"content": "What's your favorite way of doing type safe flags in C++? I typically just use some enum/int combo, but it's not really type safe and you can combine flags from different sets.\n\n#cpp #cplusplus",
"sig": "255261df3e7146b9c2729ccff5b9577334e448d317ae595d9c6108d0d3e6d348612c7f3205d458e96e0573c6f7eeb2d85b741d28def55c9c4b548eac8f28f956"
}