|
Boost : |
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2007-10-25 11:58:36
Sean Huang escribió:
> if(total_size > (__int64)((std::size_t)(-1))){
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> error_info err(size_error);
> throw interprocess_exception(err);
> }
> size = static_cast<std::size_t>(total_size - offset);
> }
Sometimes I must admit my code is *really* bad. The ugly castswill make
that fail for 64 bit machines (where sizeof(std::size_t) ==
sizeof(__int64). I've committed a fix::
if(total_size > std::numeric_limits<std::size_t>::max()){
Let's see if things go better. Anyway, I'll continue to chatch the
access violation.
Regards,
Ion
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk