Cast should be valid accoring to standard, but not accessing such reference. Although in real world they are probably both ok.
-
Tämä twiitti ei ole saatavilla.
-
-
Vastauksena käyttäjälle @mikulasflorek
Is there a good pattern for returning an array of ptrs but preventing user modification without creating a new array? Something like a const array view?
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
Vastauksena käyttäjille @Bobby_Anguelov ja @mikulasflorek
Using span, I still need to do a const cast so not sure it's any less UBpic.twitter.com/R0FyJwXzu4
1 vastaus 0 uudelleentwiittausta 0 tykkäystä
Vastauksena käyttäjille @Bobby_Anguelov ja @mikulasflorek
I think the issue here is that you need to make the span of Foo const * const. https://godbolt.org/z/noGKac54e pic.twitter.com/QzWhK7GdJy
12.55 - 31. elok. 2021
0 vastausta
0 uudelleentwiittausta
1 tykkäys
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.