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