annotate DEPENDENCIES/generic/include/boost/units/systems/information/prefixes.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents f46d142149f5
children
rev   line source
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_PREFIXES_HPP_INCLUDED
Chris@102 11 #define BOOST_UNITS_SYSTEMS_INFORMATION_PREFIXES_HPP_INCLUDED
Chris@102 12
Chris@102 13 #include <boost/units/make_scaled_unit.hpp>
Chris@102 14 #include <boost/units/static_rational.hpp>
Chris@102 15 #include <boost/units/scale.hpp>
Chris@102 16
Chris@102 17 #include <boost/units/systems/information/byte.hpp>
Chris@102 18
Chris@102 19 #define BOOST_UNITS_INFOSYS_PREFIX(exponent, name) \
Chris@102 20 typedef make_scaled_unit<dimensionless, scale<2, static_rational<exponent> > >::type name ## _pf_type; \
Chris@102 21 BOOST_UNITS_STATIC_CONSTANT(name, name ## _pf_type)
Chris@102 22
Chris@102 23 namespace boost {
Chris@102 24 namespace units {
Chris@102 25 namespace information {
Chris@102 26
Chris@102 27 // Note, these are defined (somewhat arbitrarily) against the 'byte' system.
Chris@102 28 // They work smoothly with bit_information, nat_information, etc, so it is
Chris@102 29 // transparent to the user.
Chris@102 30 BOOST_UNITS_INFOSYS_PREFIX(10, kibi);
Chris@102 31 BOOST_UNITS_INFOSYS_PREFIX(20, mebi);
Chris@102 32 BOOST_UNITS_INFOSYS_PREFIX(30, gibi);
Chris@102 33 BOOST_UNITS_INFOSYS_PREFIX(40, tebi);
Chris@102 34 BOOST_UNITS_INFOSYS_PREFIX(50, pebi);
Chris@102 35 BOOST_UNITS_INFOSYS_PREFIX(60, exbi);
Chris@102 36 BOOST_UNITS_INFOSYS_PREFIX(70, zebi);
Chris@102 37 BOOST_UNITS_INFOSYS_PREFIX(80, yobi);
Chris@102 38
Chris@102 39 } // namespace information
Chris@102 40 } // namespace units
Chris@102 41 } // namespace boost
Chris@102 42
Chris@102 43 #undef BOOST_UNITS_INFOSYS_PREFIX
Chris@102 44
Chris@102 45 #endif // BOOST_UNITS_SYSTEMS_INFORMATION_PREFIXES_HPP_INCLUDED