|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r62922 - in sandbox/endian_ext/libs/integer: example test
From: vicente.botet_at_[hidden]
Date: 2010-06-13 14:35:12
Author: viboes
Date: 2010-06-13 14:35:12 EDT (Sun, 13 Jun 2010)
New Revision: 62922
URL: http://svn.boost.org/trac/boost/changeset/62922
Log:
Update to use boost cstdint types
Text files modified:
sandbox/endian_ext/libs/integer/example/packet_example.cpp | 37 ++++++++++++++++++-------------------
sandbox/endian_ext/libs/integer/test/Jamfile.v2 | 1 +
2 files changed, 19 insertions(+), 19 deletions(-)
Modified: sandbox/endian_ext/libs/integer/example/packet_example.cpp
==============================================================================
--- sandbox/endian_ext/libs/integer/example/packet_example.cpp (original)
+++ sandbox/endian_ext/libs/integer/example/packet_example.cpp 2010-06-13 14:35:12 EDT (Sun, 13 Jun 2010)
@@ -13,7 +13,7 @@
//~ #include <iostream>
//~ #include <cassert>
-//~ #include <cstdio>
+#include <boost/cstdint.hpp>
#include <boost/integer/endian_pack.hpp>
#include <boost/chrono/chrono.hpp>
#include <boost/units/quantity.hpp>
@@ -67,16 +67,16 @@
struct IpHeader {
- struct version{};
- struct header_length{};
- struct precedence{};
- struct low_delay{};
- struct high_thruput{};
- struct high_reliability{};
- struct minimize_cost{};
- struct dont_frag{};
- struct more_frag{};
- struct frag_offset{};
+ struct version {};
+ struct header_length {};
+ struct precedence {};
+ struct low_delay {};
+ struct high_thruput {};
+ struct high_reliability {};
+ struct minimize_cost {};
+ struct dont_frag {};
+ struct more_frag {};
+ struct frag_offset {};
/////////////////////////////
bitfield::tuple<ubig8_pt,
@@ -123,18 +123,17 @@
struct UserMessage {
- endian_pack<little, time_point<system_clock, duration<int64_t, nanoseconds> > >
-timestamp;
+ endian_pack<little, system_clock::time_point > timestamp;
ulittle32_pt aircraft_id;
struct Position {
- endian_pack<little, quantity<si::length, int> > x;
- endian_pack<little, quantity<si::length, int> > y;
- endian_pack<little, quantity<si::length, int> > z;
+ endian_pack<little, quantity<si::length, boost::int_least32_t> > x;
+ endian_pack<little, quantity<si::length, boost::int_least32_t> > y;
+ endian_pack<little, quantity<si::length, boost::int_least32_t> > z;
} position;
struct Attitude {
- endian_pack<little, quantity<si::plane_angle, int8_t> > heading;
- endian_pack<little, quantity<si::plane_angle, int8_t> > pitch;
- endian_pack<little, quantity<si::plane_angle, int8_t> > roll;
+ endian_pack<little, quantity<si::plane_angle, boost::int_least8_t> > heading;
+ endian_pack<little, quantity<si::plane_angle, boost::int_least8_t> > pitch;
+ endian_pack<little, quantity<si::plane_angle, boost::int_least8_t> > roll;
} attitude;
}; // UserMessage
Modified: sandbox/endian_ext/libs/integer/test/Jamfile.v2
==============================================================================
--- sandbox/endian_ext/libs/integer/test/Jamfile.v2 (original)
+++ sandbox/endian_ext/libs/integer/test/Jamfile.v2 2010-06-13 14:35:12 EDT (Sun, 13 Jun 2010)
@@ -11,6 +11,7 @@
project
: requirements
+ <library>/boost/chrono//boost_chrono
<library>/boost/system//boost_system
;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk