units moved to std::experimental namespace

This commit is contained in:
Mateusz Pusz committed 2019-07-24 11:58:15 +02:00
1 parent 4ca2004859
commit 98203afa29
49 files changed
+151 -111

No files matched your search

+2 -2
View File
@@ -24,7 +24,7 @@
#include <units/length.h>
namespace units {
namespace std::experimental::units {
struct dimension_area : make_dimension_t<exp<base_dim_length, 2>> {};
template<> struct downcasting_traits<downcast_from<dimension_area>> : downcast_to<dimension_area> {};
@@ -67,4 +67,4 @@ namespace units {
} // namespace literals
} // namespace units
} // namespace std::experimental::units
+2 -2
View File
@@ -24,7 +24,7 @@
#include <units/dimension.h>
namespace units {
namespace std::experimental::units {
// todo: to be replaced with fixed_string when supported by the compilers
@@ -36,4 +36,4 @@ namespace units {
struct base_dim_substance : dim_id<5> {};
struct base_dim_luminous_intensity : dim_id<6> {};
} // namespace units
} // namespace std::experimental::units
+2 -2
View File
@@ -24,7 +24,7 @@
#include <units/bits/hacks.h>
namespace units {
namespace std::experimental::units {
template<typename T>
concept bool Number = std::Regular<T> &&
@@ -43,4 +43,4 @@ namespace units {
// …
} ;
} // namespace units
} // namespace std::experimental::units
+2 -2
View File
@@ -25,7 +25,7 @@
#include <units/bits/hacks.h>
#include <type_traits>
namespace units {
namespace std::experimental::units {
template<typename BaseType>
struct downcast_base {
@@ -51,4 +51,4 @@ namespace units {
template<Downcastable T>
using downcasting_traits_t = downcasting_traits<T>::type;
} // namespace units
} // namespace std::experimental::units
+2 -2
View File
@@ -24,7 +24,7 @@
#include <units/bits/type_traits.h>
namespace units {
namespace std::experimental::units {
namespace detail {
@@ -182,4 +182,4 @@ namespace units {
template<TypeList List, template<typename, typename> typename Pred>
using type_list_sort = detail::type_list_sort_impl<List, Pred>::type;
} // namespace units
} // namespace std::experimental::units
+1 -1
View File
@@ -24,7 +24,7 @@
#include <type_traits>
namespace units {
namespace std::experimental::units {
namespace detail {
+2 -2
View File
@@ -25,7 +25,7 @@
#include <units/base_dimensions.h>
#include <units/quantity.h>
namespace units {
namespace std::experimental::units {
struct dimension_current : make_dimension_t<exp<base_dim_current, 1>> {};
template<> struct downcasting_traits<downcast_from<dimension_current>> : downcast_to<dimension_current> {};
@@ -44,4 +44,4 @@ namespace units {
}
} // namespace units
} // namespace std::experimental::units
+2 -2
View File
@@ -25,7 +25,7 @@
#include <units/bits/type_list.h>
#include <units/bits/downcasting.h>
namespace units {
namespace std::experimental::units {
// dim_id
@@ -186,4 +186,4 @@ namespace units {
template<Dimension D1, Dimension D2>
using dimension_divide_t = dimension_divide<typename D1::base_type, typename D2::base_type>::type;
} // namespace units
} // namespace std::experimental::units
+2 -2
View File
@@ -25,7 +25,7 @@
#include <units/base_dimensions.h>
#include <units/time.h>
namespace units {
namespace std::experimental::units {
struct dimension_frequency : make_dimension_t<exp<base_dim_time, -1>> {};
template<> struct downcasting_traits<downcast_from<dimension_frequency>> : downcast_to<dimension_frequency> {};
@@ -79,4 +79,4 @@ namespace units {
} // namespace literals
} // namespace units
} // namespace std::experimental::units
+2 -2
View File
@@ -25,7 +25,7 @@
#include <units/base_dimensions.h>
#include <units/quantity.h>
namespace units {
namespace std::experimental::units {
struct dimension_length : make_dimension_t<exp<base_dim_length, 1>> {};
template<> struct downcasting_traits<downcast_from<dimension_length>> : downcast_to<dimension_length> {};
@@ -99,4 +99,4 @@ namespace units {
} // namespace literals
} // namespace units
} // namespace std::experimental::units
+2 -2
View File
@@ -25,7 +25,7 @@
#include <units/base_dimensions.h>
#include <units/quantity.h>
namespace units {
namespace std::experimental::units {
struct dimension_luminous_intensity : make_dimension_t<exp<base_dim_luminous_intensity, 1>> {};
template<> struct downcasting_traits<downcast_from<dimension_luminous_intensity>> : downcast_to<dimension_luminous_intensity> {};
@@ -44,4 +44,4 @@ namespace units {
} // namespace literals
} // namespace units
} // namespace std::experimental::units
+2 -2
View File
@@ -25,7 +25,7 @@
#include <units/base_dimensions.h>
#include <units/quantity.h>
namespace units {
namespace std::experimental::units {
struct dimension_mass : make_dimension_t<exp<base_dim_mass, 1>> {};
template<> struct downcasting_traits<downcast_from<dimension_mass>> : downcast_to<dimension_mass> {};
@@ -51,4 +51,4 @@ namespace units {
} // namespace literals
} // namespace units
} // namespace std::experimental::units
+2 -2
View File
@@ -27,7 +27,7 @@
#include <limits>
#include <gsl/gsl-lite.hpp>
namespace units {
namespace std::experimental::units {
// is_quantity
namespace detail {
@@ -408,4 +408,4 @@ namespace units {
return !(lhs < rhs);
}
} // namespace units
} // namespace std::experimental::units
+2 -2
View File
@@ -27,7 +27,7 @@
#include <cstdint>
#include <gsl/gsl-lite.hpp>
namespace units {
namespace std::experimental::units {
namespace detail {
@@ -135,4 +135,4 @@ namespace units {
template<Ratio R1, Ratio R2>
using common_ratio = typename detail::common_ratio_impl<R1, R2>::type;
} // namespace units
} // namespace std::experimental::units
+2 -2
View File
@@ -25,7 +25,7 @@
#include <units/base_dimensions.h>
#include <units/quantity.h>
namespace units {
namespace std::experimental::units {
struct dimension_substance : make_dimension_t<exp<base_dim_substance, 1>> {};
template<> struct downcasting_traits<downcast_from<dimension_substance>> : downcast_to<dimension_substance> {};
@@ -44,4 +44,4 @@ namespace units {
} // namespace literals
} // namespace units
} // namespace std::experimental::units
+2 -2
View File
@@ -25,7 +25,7 @@
#include <units/base_dimensions.h>
#include <units/quantity.h>
namespace units {
namespace std::experimental::units {
struct dimension_temperature : make_dimension_t<exp<base_dim_temperature, 1>> {};
template<> struct downcasting_traits<downcast_from<dimension_temperature>> : downcast_to<dimension_temperature> {};
@@ -44,4 +44,4 @@ namespace units {
} // namespace literals
} // namespace units
} // namespace std::experimental::units
+2 -2
View File
@@ -25,7 +25,7 @@
#include <units/base_dimensions.h>
#include <units/quantity.h>
namespace units {
namespace std::experimental::units {
struct dimension_time : make_dimension_t<exp<base_dim_time, 1>> {};
template<> struct downcasting_traits<downcast_from<dimension_time>> : downcast_to<dimension_time> {};
@@ -79,4 +79,4 @@ namespace units {
} // namespace literals
} // namespace units
} // namespace std::experimental::units
+4 -4
View File
@@ -26,7 +26,7 @@
#include <units/ratio.h>
#include <ratio>
namespace units {
namespace std::experimental::units {
template<Dimension D, Ratio R = ratio<1>>
requires (R::num > 0)
@@ -68,7 +68,7 @@ namespace units {
template<typename BaseDimension, Unit... Us>
struct get_ratio {
using ratio = ::units::ratio<1>;
using ratio = ::std::experimental::units::ratio<1>;
};
template<typename BaseDimension, Unit U, Unit... Rest>
@@ -99,7 +99,7 @@ namespace units {
template<Unit... Us>
struct derived_ratio<dimension<>, Us...> {
using ratio = ::units::ratio<1>;
using ratio = ::std::experimental::units::ratio<1>;
};
template<Exponent E, Exponent... Rest, Unit... Us>
@@ -131,4 +131,4 @@ namespace 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 units
} // namespace std::experimental::units
+2 -2
View File
@@ -25,7 +25,7 @@
#include <units/length.h>
#include <units/time.h>
namespace units {
namespace std::experimental::units {
struct dimension_velocity : make_dimension_t<exp<base_dim_length, 1>, exp<base_dim_time, -1>> {};
template<> struct downcasting_traits<downcast_from<dimension_velocity>> : downcast_to<dimension_velocity> {};
@@ -58,4 +58,4 @@ namespace units {
} // namespace literals
} // namespace units
} // namespace std::experimental::units