I guess I'll throw in my (unverified) observation. vector<int*> and vector<int const*> are two unrelated types, regardless of the relationship of the types they contain, and as such the cast is UB.
Then again, -fsanitize=undefined didn't trip for this code, which looks real suspect to me.pic.twitter.com/8K1fPxmD1x
-
-
-Wstrict-aliasing and friends are more likely to catch this at compile time than UBSan is at runtime
Kiitos. Käytämme tätä aikajanasi parantamiseen. KumoaKumoa
-
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.