• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Boost.Units - A C++ library for zero-overhead dimensional analysis and
2 // unit/quantity manipulation and conversion
3 //
4 // Copyright (C) 2014 Erik Erlandson
5 //
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)
9 
10 #ifndef BOOST_UNITS_BASE_UNITS_INFORMATION_BIT_HPP_INCLUDED
11 #define BOOST_UNITS_BASE_UNITS_INFORMATION_BIT_HPP_INCLUDED
12 
13 #include <string>
14 
15 #include <boost/units/config.hpp>
16 #include <boost/units/base_unit.hpp>
17 #include <boost/units/physical_dimensions/information.hpp>
18 
19 namespace boost {
20 namespace units {
21 namespace information {
22 
23 struct bit_base_unit : public base_unit<bit_base_unit, information_dimension, -700>
24 {
nameboost::units::information::bit_base_unit25     static std::string name()   { return("bit"); }
symbolboost::units::information::bit_base_unit26     static std::string symbol() { return("b"); }
27 };
28 
29 } // namespace information
30 } // namespace units
31 } // namespace boost
32 
33 #if BOOST_UNITS_HAS_BOOST_TYPEOF
34 
35 #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
36 
37 BOOST_TYPEOF_REGISTER_TYPE(boost::units::information::bit_base_unit)
38 
39 #endif
40 
41 #endif // BOOST_UNITS_BASE_UNITS_INFORMATION_BIT_HPP_INCLUDED
42