Why is "uint64_t bits = reinterpret_cast<uint64_t>(1.5);" invalid?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Why is 
  uint64_t bits = reinterpret_cast<uint64_t>(1.5);
invalid? 

"Miles Bader" writes:
> That is sort of weird -- my impression was that reinterpret_cast was
> _always_ valid as it didn't change type attributes
> (e.g. const/volatile), and maintained certain necessary invariants like
> both types being scalars or whatever...

Lee.





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux