Open trachten opened 4 years ago
I assumed that long
and size_t
are of the same size (8 bytes on 64-bit platforms).
Do you think that I should have better written a size_t Communicant::commRecv_size_t()
?
There are systems we want to support where narrow_cast<size_t>(long)
would fail?
You shouldn’t assume that size_t == long. It’s not necessarily the case on other systems.
On Jul 21, 2020, at 9:31 PM, Novak Boškov notifications@github.com wrote:
I assumed that long and size_t are of the same size (8 bytes on 64-bit platforms). Do you think that I should have better written a size_t Communicant::commRecv_size_t()? There are systems we want to support where narrow_cast
(long) would fail? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/trachten/cpisync/issues/57#issuecomment-662189917, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACM5LU3B2NCR7G45ZHUSR43R4Y6OPANCNFSM4NUUMPEQ.
Prof. Ari Trachtenberg ECE, Boston University trachten@bu.edu http://people.bu.edu/trachten
Why does this receive
long
s when the constructor parameters are size_t's?