/
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/pow.hpp
(3033B)
// 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) 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) #ifndef BOOST_UNITS_POW_HPP #define BOOST_UNITS_POW_HPP #include <boost/type_traits/is_integral.hpp> #include <boost/units/operators.hpp> #include <boost/units/static_rational.hpp> #include <boost/units/detail/static_rational_power.hpp> /// \file /// \brief Raise values to exponents known at compile-time. namespace boost { namespace units { /// raise a value to a @c static_rational power. template<class Rat,class Y> BOOST_CONSTEXPR inline typename power_typeof_helper<Y,Rat>::type pow(const Y& x) { return power_typeof_helper<Y,Rat>::value(x); } /// raise a value to an integer power. template<long N,class Y> BOOST_CONSTEXPR inline typename power_typeof_helper<Y,static_rational<N> >::type pow(const Y& x) { return power_typeof_helper<Y,static_rational<N> >::value(x); } #ifndef BOOST_UNITS_DOXYGEN /// raise @c T to a @c static_rational power. template<class T, long N,long D> struct power_typeof_helper<T, static_rational<N,D> > { typedef typename mpl::if_<boost::is_integral<T>, double, T>::type internal_type; typedef detail::static_rational_power_impl<static_rational<N, D>, internal_type> impl; typedef typename impl::type type; static BOOST_CONSTEXPR type value(const T& x) { return impl::call(x); } }; /// raise @c float to a @c static_rational power. template<long N,long D> struct power_typeof_helper<float, static_rational<N,D> > { // N.B. pathscale doesn't accept inheritance for some reason. typedef power_typeof_helper<double, static_rational<N,D> > base; typedef typename base::type type; static BOOST_CONSTEXPR type value(const double& x) { return base::value(x); } }; #endif /// take the @c static_rational root of a value. template<class Rat,class Y> BOOST_CONSTEXPR typename root_typeof_helper<Y,Rat>::type root(const Y& x) { return root_typeof_helper<Y,Rat>::value(x); } /// take the integer root of a value. template<long N,class Y> BOOST_CONSTEXPR typename root_typeof_helper<Y,static_rational<N> >::type root(const Y& x) { return root_typeof_helper<Y,static_rational<N> >::value(x); } #ifndef BOOST_UNITS_DOXYGEN /// take @c static_rational root of an @c T template<class T, long N,long D> struct root_typeof_helper<T,static_rational<N,D> > { // N.B. pathscale doesn't accept inheritance for some reason. typedef power_typeof_helper<T, static_rational<D,N> > base; typedef typename base::type type; static BOOST_CONSTEXPR type value(const T& x) { return(base::value(x)); } }; #endif } // namespace units } // namespace boost #endif // BOOST_UNITS_STATIC_RATIONAL_HPP
Save
cmd:
run