/
usr
/
include
/
boost
/
units
/
/usr/include/boost/units
mkdir
upload
Name
Size
Mode
Actions
base_units/
-
0755
rm
detail/
-
0755
rm
physical_dimensions/
-
0755
rm
systems/
-
0755
rm
absolute.hpp
5540
0644
edit
dl
rm
base_dimension.hpp
3692
0644
edit
dl
rm
base_unit.hpp
4132
0644
edit
dl
rm
cmath.hpp
20592
0644
edit
dl
rm
config.hpp
2829
0644
edit
dl
rm
conversion.hpp
9518
0644
edit
dl
rm
derived_dimension.hpp
6465
0644
edit
dl
rm
dim.hpp
4745
0644
edit
dl
rm
dimension.hpp
4403
0644
edit
dl
rm
dimensionless_quantity.hpp
995
0644
edit
dl
rm
dimensionless_type.hpp
1315
0644
edit
dl
rm
dimensionless_unit.hpp
957
0644
edit
dl
rm
get_dimension.hpp
1221
0644
edit
dl
rm
get_system.hpp
1165
0644
edit
dl
rm
heterogeneous_system.hpp
12258
0644
edit
dl
rm
homogeneous_system.hpp
2399
0644
edit
dl
rm
io.hpp
32470
0644
edit
dl
rm
is_dim.hpp
885
0644
edit
dl
rm
is_dimensionless.hpp
1107
0644
edit
dl
rm
is_dimensionless_quantity.hpp
936
0644
edit
dl
rm
is_dimensionless_unit.hpp
905
0644
edit
dl
rm
is_dimension_list.hpp
1057
0644
edit
dl
rm
is_quantity.hpp
916
0644
edit
dl
rm
is_quantity_of_dimension.hpp
1115
0644
edit
dl
rm
is_quantity_of_system.hpp
1097
0644
edit
dl
rm
is_unit.hpp
879
0644
edit
dl
rm
is_unit_of_dimension.hpp
1138
0644
edit
dl
rm
is_unit_of_system.hpp
1127
0644
edit
dl
rm
lambda.hpp
26841
0644
edit
dl
rm
limits.hpp
4345
0644
edit
dl
rm
make_scaled_unit.hpp
1817
0644
edit
dl
rm
make_system.hpp
4914
0644
edit
dl
rm
operators.hpp
6287
0644
edit
dl
rm
physical_dimensions.hpp
4532
0644
edit
dl
rm
pow.hpp
3033
0644
edit
dl
rm
quantity.hpp
41860
0644
edit
dl
rm
reduce_unit.hpp
868
0644
edit
dl
rm
scale.hpp
5062
0644
edit
dl
rm
scaled_base_unit.hpp
3643
0644
edit
dl
rm
static_constant.hpp
2425
0644
edit
dl
rm
static_rational.hpp
10435
0644
edit
dl
rm
unit.hpp
13449
0644
edit
dl
rm
units_fwd.hpp
2191
0644
edit
dl
rm
Edit:
/usr/include/boost/units/base_unit.hpp
(4132B)
// Boost.Units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2008 Matthias Christian Schabel // Copyright (C) 2007-2008 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) /// \file /// \brief base unit (meter, kg, sec...). /// \details base unit definition registration. #ifndef BOOST_UNITS_BASE_UNIT_HPP #define BOOST_UNITS_BASE_UNIT_HPP #include <boost/units/config.hpp> #include <boost/units/heterogeneous_system.hpp> #include <boost/units/static_rational.hpp> #include <boost/units/units_fwd.hpp> #include <boost/units/unit.hpp> #include <boost/units/detail/dimension_list.hpp> #include <boost/units/detail/ordinal.hpp> #include <boost/units/detail/prevent_redefinition.hpp> namespace boost { namespace units { /// This must be in namespace boost::units so that ADL /// will work with friend functions defined inline. /// Base dimensions and base units are independent. /// INTERNAL ONLY template<long N> struct base_unit_ordinal { }; /// INTERNAL ONLY template<class T, long N> struct base_unit_pair { }; /// INTERNAL ONLY template<class T, long N> struct check_base_unit { enum { value = sizeof(boost_units_unit_is_registered(units::base_unit_ordinal<N>())) == sizeof(detail::yes) && sizeof(boost_units_unit_is_registered(units::base_unit_pair<T, N>())) != sizeof(detail::yes) }; }; /// Defines a base unit. To define a unit you need to provide /// the derived class (CRTP), a dimension list and a unique integer. /// @code /// struct my_unit : boost::units::base_unit<my_unit, length_dimension, 1> {}; /// @endcode /// It is designed so that you will get an error message if you try /// to use the same value in multiple definitions. template<class Derived, class Dim, long N #if !defined(BOOST_UNITS_DOXYGEN) && !defined(__BORLANDC__) , class = typename detail::ordinal_has_already_been_defined< check_base_unit<Derived, N>::value >::type #endif > class base_unit : public ordinal<N> { public: /// INTERNAL ONLY typedef void boost_units_is_base_unit_type; /// INTERNAL ONLY typedef base_unit this_type; /// The dimensions of this base unit. typedef Dim dimension_type; /// Provided for mpl compatability. typedef Derived type; /// The unit corresponding to this base unit. #ifndef BOOST_UNITS_DOXYGEN typedef unit< Dim, heterogeneous_system< heterogeneous_system_impl< list< heterogeneous_system_dim<Derived,static_rational<1> >, dimensionless_type >, Dim, no_scale > > > unit_type; #else typedef detail::unspecified unit_type; #endif private: /// Check for C++0x. In C++0x, we have to have identical /// arguments but a different return type to trigger an /// error. Note that this is only needed for clang as /// check_base_unit will trigger an error earlier /// for compilers with less strict name lookup. /// INTERNAL ONLY friend BOOST_CONSTEXPR Derived* check_double_register(const units::base_unit_ordinal<N>&) { return(0); } /// Register this ordinal /// INTERNAL ONLY friend BOOST_CONSTEXPR detail::yes boost_units_unit_is_registered(const units::base_unit_ordinal<N>&) { return(detail::yes()); } /// But make sure we can identify the current instantiation! /// INTERNAL ONLY friend BOOST_CONSTEXPR detail::yes boost_units_unit_is_registered(const units::base_unit_pair<Derived, N>&) { return(detail::yes()); } }; } // namespace units } // namespace boost #endif // BOOST_UNITS_BASE_UNIT_HPP
Save
cmd:
run