Hi there, boost::format will not swallow "%I64d". Instead, it throws a boost::io::bad_format_string exception. How can I use 64 bit integers? Thanks, Christian
Last time I checked, boost has one.
On 4/17/06, loufoque
Christian Henning wrote :
boost::format will not swallow "%I64d". Instead, it throws a boost::io::bad_format_string exception. How can I use 64 bit integers?
C++ doesn't have a 64 bit integer type.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On 4/17/06, Christian Henning
Last time I checked, boost has one.
He probably means that long long is not part of the (official) standard, although most compilers do support long long.
On 4/17/06, loufoque
wrote: Christian Henning wrote :
boost::format will not swallow "%I64d". Instead, it throws a boost::io::bad_format_string exception. How can I use 64 bit integers?
C++ doesn't have a 64 bit integer type.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On Mon, 17 Apr 2006 22:14:02 +0200, Olaf van der Spek wrote
On 4/17/06, Christian Henning
wrote: Last time I checked, boost has one.
He probably means that long long is not part of the (official) standard, although most compilers do support long long.
Well not really. Some compilers call it long long -- some call it other names. That's why there is boost::int64_t (and friends) which mirrors the C types from stdint.h. I can assure you that it works on every platform where date-time compiles b/c I use it for the internal representations and it works just fine. The documentation of this is a bit hard to see, but if you read about exact-width integers at: http://www.boost.org/libs/integer/cstdint.htm you'll find it. So the practical effect is that it's there if you want it. Also, I believe the library working group is considering adding these C types for TR2 -- so eventually it will be official... Jeff
Thanks, that worked. Cool Is that feature mentioned in the documentation? Greets, Christian
I think it's important to document that boost.format doesn't care for the actual size. How does it work when there is only "%d"? Just image for 128, 96 or 16 bit integers. Thanks, Christian
participants (4)
-
Christian Henning
-
Jeff Garland
-
loufoque
-
Olaf van der Spek