How to do portable 64 bit arithmetic, without compiler warnings

后端 未结 7 1023
情歌与酒
情歌与酒 2021-02-12 22:38

I occasionally use 64 bit arithmetic in an open source C++ library of mine. I discovered that long long serves my purpose quite nicely. Even some 10 year old solari

7条回答
  •  感情败类
    2021-02-12 23:33

    If you have Boost in a system include directory, you can say

    #include "boost/cstdint.hpp"
    boost::int64_t my_64_bit_number;
    

    If it is in a system include directory, warnings are automatically suppressed.

提交回复
热议问题