Chris@102
|
1 // Boost.Units - A C++ library for zero-overhead dimensional analysis and
|
Chris@102
|
2 // unit/quantity manipulation and conversion
|
Chris@102
|
3 //
|
Chris@102
|
4 // Copyright (C) 2014 Erik Erlandson
|
Chris@102
|
5 //
|
Chris@102
|
6 // Distributed under the Boost Software License, Version 1.0. (See
|
Chris@102
|
7 // accompanying file LICENSE_1_0.txt or copy at
|
Chris@102
|
8 // http://www.boost.org/LICENSE_1_0.txt)
|
Chris@102
|
9
|
Chris@102
|
10 #ifndef BOOST_UNITS_SYSTEMS_INFORMATION_BYTE_HPP_INCLUDED
|
Chris@102
|
11 #define BOOST_UNITS_SYSTEMS_INFORMATION_BYTE_HPP_INCLUDED
|
Chris@102
|
12
|
Chris@102
|
13 #include <boost/units/make_system.hpp>
|
Chris@102
|
14 #include <boost/units/unit.hpp>
|
Chris@102
|
15 #include <boost/units/static_constant.hpp>
|
Chris@102
|
16
|
Chris@102
|
17 #include <boost/units/base_units/information/byte.hpp>
|
Chris@102
|
18
|
Chris@102
|
19 namespace boost {
|
Chris@102
|
20 namespace units {
|
Chris@102
|
21 namespace information {
|
Chris@102
|
22
|
Chris@102
|
23 typedef make_system<byte_base_unit>::type system;
|
Chris@102
|
24
|
Chris@102
|
25 typedef unit<dimensionless_type, system> dimensionless;
|
Chris@102
|
26
|
Chris@102
|
27 namespace hu {
|
Chris@102
|
28 namespace byte {
|
Chris@102
|
29 typedef unit<information_dimension, system> info;
|
Chris@102
|
30 } // namespace bit
|
Chris@102
|
31 } // namespace hu
|
Chris@102
|
32
|
Chris@102
|
33 BOOST_UNITS_STATIC_CONSTANT(byte, hu::byte::info);
|
Chris@102
|
34 BOOST_UNITS_STATIC_CONSTANT(bytes, hu::byte::info);
|
Chris@102
|
35
|
Chris@102
|
36 // I'm going to define boost::units::information::info (the "default")
|
Chris@102
|
37 // to be hu::byte::info -- other variants such as hu::bit::info, hu::nat::info, etc
|
Chris@102
|
38 // must be explicitly referred to
|
Chris@102
|
39 typedef hu::byte::info info;
|
Chris@102
|
40
|
Chris@102
|
41 } // namespace information
|
Chris@102
|
42 } // namespace units
|
Chris@102
|
43 } // namespace boost
|
Chris@102
|
44
|
Chris@102
|
45 #endif // BOOST_UNITS_SYSTEMS_INFORMATION_BYTE_HPP_INCLUDED
|