forked from mpusz/mp-units
units removed from a std::experimental namespace
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <units/bits/hacks.h>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
template<typename T>
|
||||
concept bool Number = std::regular<T> &&
|
||||
@@ -43,4 +43,4 @@ namespace std::experimental::units {
|
||||
// …
|
||||
};
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <units/bits/hacks.h>
|
||||
#include <type_traits>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
template<typename BaseType>
|
||||
struct downcast_base {
|
||||
@@ -51,4 +51,4 @@ namespace std::experimental::units {
|
||||
template<Downcastable T>
|
||||
using downcasting_traits_t = downcasting_traits<T>::type;
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <units/bits/type_traits.h>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
namespace detail {
|
||||
|
||||
@@ -182,4 +182,4 @@ namespace std::experimental::units {
|
||||
template<TypeList List, template<typename, typename> typename Pred>
|
||||
using type_list_sort = detail::type_list_sort_impl<List, Pred>::type;
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
namespace detail {
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <units/ratio.h>
|
||||
#include <ratio>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
template<typename T>
|
||||
concept bool BaseDimension = std::is_empty_v<T> &&
|
||||
@@ -286,4 +286,4 @@ namespace std::experimental::units {
|
||||
template<Dimension D, std::size_t N>
|
||||
using dimension_pow_t = dimension_pow<typename D::base_type, N>::type;
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <units/dimensions/velocity.h>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
struct acceleration : make_dimension_t<exp<velocity, 1>, exp<base_dim_time, -1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<acceleration>> : downcast_to<acceleration> {};
|
||||
@@ -43,4 +43,4 @@ namespace std::experimental::units {
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <units/dimensions/length.h>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
struct area : make_dimension_t<exp<base_dim_length, 2>> {};
|
||||
template<> struct downcasting_traits<downcast_from<area>> : downcast_to<area> {};
|
||||
@@ -67,4 +67,4 @@ namespace std::experimental::units {
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <units/dimension.h>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
struct base_dim_length { static constexpr const char* value = "length"; };
|
||||
struct base_dim_mass { static constexpr const char* value = "mass"; };
|
||||
@@ -34,4 +34,4 @@ namespace std::experimental::units {
|
||||
struct base_dim_substance { static constexpr const char* value = "substance"; };
|
||||
struct base_dim_luminous_intensity { static constexpr const char* value = "luminous intensity"; };
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/dimensions/electric_charge.h>
|
||||
#include <units/dimensions/voltage.h>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
struct capacitance : make_dimension_t<exp<electric_charge, 1>, exp<voltage, -1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<capacitance>> : downcast_to<capacitance> {};
|
||||
@@ -45,4 +45,4 @@ namespace std::experimental::units {
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <units/dimensions/base_dimensions.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
struct current : make_dimension_t<exp<base_dim_current, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<current>> : downcast_to<current> {};
|
||||
@@ -44,4 +44,4 @@ namespace std::experimental::units {
|
||||
|
||||
}
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/dimensions/time.h>
|
||||
#include <units/dimensions/current.h>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
struct electric_charge : make_dimension_t<exp<base_dim_time, 1>, exp<base_dim_current, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<electric_charge>> : downcast_to<electric_charge> {};
|
||||
@@ -45,4 +45,4 @@ namespace std::experimental::units {
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/dimensions/force.h>
|
||||
#include <units/dimensions/pressure.h>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
struct energy : make_dimension_t<exp<force, 1>, exp<length, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<energy>> : downcast_to<energy> {};
|
||||
@@ -45,4 +45,4 @@ namespace std::experimental::units {
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/dimensions/mass.h>
|
||||
#include <units/dimensions/acceleration.h>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
struct force : make_dimension_t<exp<base_dim_mass, 1>, exp<acceleration, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<force>> : downcast_to<force> {};
|
||||
@@ -45,4 +45,4 @@ namespace std::experimental::units {
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <units/dimensions/base_dimensions.h>
|
||||
#include <units/dimensions/time.h>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
struct frequency : make_dimension_t<exp<base_dim_time, -1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<frequency>> : downcast_to<frequency> {};
|
||||
@@ -79,4 +79,4 @@ namespace std::experimental::units {
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <units/dimensions/base_dimensions.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
struct length : make_dimension_t<exp<base_dim_length, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<length>> : downcast_to<length> {};
|
||||
@@ -99,4 +99,4 @@ namespace std::experimental::units {
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <units/dimensions/base_dimensions.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
struct luminous_intensity : make_dimension_t<exp<base_dim_luminous_intensity, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<luminous_intensity>> : downcast_to<luminous_intensity> {};
|
||||
@@ -44,4 +44,4 @@ namespace std::experimental::units {
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <units/dimensions/base_dimensions.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
struct mass : make_dimension_t<exp<base_dim_mass, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<mass>> : downcast_to<mass> {};
|
||||
@@ -51,4 +51,4 @@ namespace std::experimental::units {
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <units/dimensions/base_dimensions.h>
|
||||
#include <units/dimensions/energy.h>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
struct power : make_dimension_t<exp<energy, 1>, exp<base_dim_time, -1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<power>> : downcast_to<power> {};
|
||||
@@ -44,4 +44,4 @@ namespace std::experimental::units {
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/dimensions/force.h>
|
||||
#include <units/dimensions/area.h>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
struct pressure : make_dimension_t<exp<force, 1>, exp<area, -1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<pressure>> : downcast_to<pressure> {};
|
||||
@@ -45,4 +45,4 @@ namespace std::experimental::units {
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <units/dimensions/base_dimensions.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
struct substance : make_dimension_t<exp<base_dim_substance, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<substance>> : downcast_to<substance> {};
|
||||
@@ -44,4 +44,4 @@ namespace std::experimental::units {
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <units/dimensions/base_dimensions.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
struct temperature : make_dimension_t<exp<base_dim_temperature, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<temperature>> : downcast_to<temperature> {};
|
||||
@@ -44,4 +44,4 @@ namespace std::experimental::units {
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <units/dimensions/base_dimensions.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
struct time : make_dimension_t<exp<base_dim_time, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<time>> : downcast_to<time> {};
|
||||
@@ -79,4 +79,4 @@ namespace std::experimental::units {
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <units/dimensions/length.h>
|
||||
#include <units/dimensions/time.h>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
struct velocity : make_dimension_t<exp<base_dim_length, 1>, exp<base_dim_time, -1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<velocity>> : downcast_to<velocity> {};
|
||||
@@ -58,4 +58,4 @@ namespace std::experimental::units {
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <units/dimensions/energy.h>
|
||||
#include <units/dimensions/electric_charge.h>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
struct voltage : make_dimension_t<exp<power, 1>, exp<base_dim_current, -1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<voltage>> : downcast_to<voltage> {};
|
||||
@@ -47,4 +47,4 @@ namespace std::experimental::units {
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <units/dimensions/length.h>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
struct volume : make_dimension_t<exp<base_dim_length, 3>> {};
|
||||
template<> struct downcasting_traits<downcast_from<volume>> : downcast_to<volume> {};
|
||||
@@ -67,4 +67,4 @@ namespace std::experimental::units {
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <units/quantity.h>
|
||||
#include <cmath>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
template<std::size_t N, typename U, typename Rep>
|
||||
inline Quantity pow(const quantity<U, Rep>& q) noexcept
|
||||
@@ -43,4 +43,4 @@ namespace std::experimental::units {
|
||||
return quantity<downcasting_traits_t<unit<dim, r>>, Rep>(std::sqrt(q.count()));
|
||||
}
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/bits/concepts.h>
|
||||
#include <limits>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
// is_quantity
|
||||
namespace detail {
|
||||
@@ -430,4 +430,4 @@ namespace std::experimental::units {
|
||||
return !(lhs < rhs);
|
||||
}
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <numeric>
|
||||
#include <cstdint>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
namespace detail {
|
||||
|
||||
@@ -196,4 +196,4 @@ namespace std::experimental::units {
|
||||
template<Ratio R1, Ratio R2>
|
||||
using common_ratio = detail::common_ratio_impl<R1, R2>::type;
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/ratio.h>
|
||||
#include <ratio>
|
||||
|
||||
namespace std::experimental::units {
|
||||
namespace units {
|
||||
|
||||
template<Dimension D, Ratio R = ratio<1>>
|
||||
requires (R::num * R::den > 0)
|
||||
@@ -68,7 +68,7 @@ namespace std::experimental::units {
|
||||
|
||||
template<BaseDimension BD, typename... Us>
|
||||
struct get_ratio {
|
||||
using ratio = ::std::experimental::units::ratio<1>;
|
||||
using ratio = ::units::ratio<1>;
|
||||
};
|
||||
|
||||
template<BaseDimension BD, typename U, typename... Rest>
|
||||
@@ -99,7 +99,7 @@ namespace std::experimental::units {
|
||||
|
||||
template<typename... Us>
|
||||
struct derived_ratio<dimension<>, Us...> {
|
||||
using ratio = ::std::experimental::units::ratio<1>;
|
||||
using ratio = ::units::ratio<1>;
|
||||
};
|
||||
|
||||
template<typename E, typename... Rest, typename... Us>
|
||||
@@ -131,4 +131,4 @@ namespace std::experimental::units {
|
||||
template<Unit U> using peta = unit<typename U::dimension, ratio_multiply<typename U::ratio, ratio<std::peta::num>>>;
|
||||
template<Unit U> using exa = unit<typename U::dimension, ratio_multiply<typename U::ratio, ratio<std::exa::num>>>;
|
||||
|
||||
} // namespace std::experimental::units
|
||||
} // namespace units
|
||||
|
||||
Reference in New Issue
Block a user