Cute trick, but why not just cast it away? Is that not enough to trick the compiler? (cc: @johnregehr)pic.twitter.com/7CvG2iWpBK
You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more
@johnregehr @marius Is it still April Fool's Day in Utah? Not UB unless an attempt is made to modify the pointed-to-value through it, right?
@BRIAN_____ @marius but why remove the const if you're not going to store through the pointer?
@johnregehr @marius 2. The case here, you have a callback interface and you want to share code for callbacks that modify & ones that don't.
@BRIAN_____ @marius in these cases the cast should be ok, no need for union, I think
@johnregehr @marius I agree. I don't see how the union improves the code at all.
@BRIAN_____ @johnregehr @marius Another case: https://git.openssl.org/?p=openssl.git;a=blob;f=crypto/bn/bn_lcl.h;h=412740d4ba007fdb0812e80fe18c9e9ce8f4aa02;hb=HEAD#l264 …
I wonder why such complexities...
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.