Set all bytes of int to (unsigned char)0, guaranteed to represent zero?

前端 未结 4 667
悲哀的现实
悲哀的现实 2020-11-30 08:10

This is not a matter of recommended practise (nor undefined behavior), but about what the c++-standard actually guarantees in th

4条回答
  •  日久生厌
    2020-11-30 09:10

    Nope. For example, there's nothing in the Standard banning a bias-based representation, it only mandates that it is binary.

提交回复
热议问题