units removed from a std::experimental namespace

This commit is contained in:
Mateusz Pusz committed 2019-09-18 21:55:16 -06:00
1 parent 6390eba786
commit c3d7359ca3
74 files changed
+164 -200

No files matched your search

+5 -9
View File
@@ -28,8 +28,6 @@
namespace {
using namespace std::experimental;
struct base_dim_digital_information { static constexpr const char* value = "digital information"; };
struct digital_information : units::make_dimension_t<units::exp<base_dim_digital_information, 1>> {};
@@ -51,11 +49,9 @@ namespace {
}
}
namespace stde = std::experimental;
template<> struct stde::units::downcasting_traits<stde::units::downcast_from<digital_information>> : stde::units::downcast_to<digital_information> {};
template<> struct stde::units::downcasting_traits<stde::units::downcast_from<bit>> : stde::units::downcast_to<bit> {};
template<> struct stde::units::downcasting_traits<stde::units::downcast_from<::byte>> : stde::units::downcast_to<::byte> {};
template<> struct units::downcasting_traits<units::downcast_from<digital_information>> : units::downcast_to<digital_information> {};
template<> struct units::downcasting_traits<units::downcast_from<bit>> : units::downcast_to<bit> {};
template<> struct units::downcasting_traits<units::downcast_from<::byte>> : units::downcast_to<::byte> {};
namespace {
@@ -65,7 +61,7 @@ namespace {
namespace {
using namespace stde::units;
using namespace units;
// power spectral density
struct power_spectral_density : make_dimension_t<units::exp<voltage, 2>, units::exp<frequency, -1>> {};
@@ -78,7 +74,7 @@ namespace {
struct volt_per_sqrt_hertz : unit<amplitude_spectral_density> {};
}
namespace std::experimental::units {
namespace units {
template<> struct downcasting_traits<downcast_from<power_spectral_density>> : downcast_to<power_spectral_density> {};
template<> struct downcasting_traits<downcast_from<sq_volt_per_hertz>> : downcast_to<sq_volt_per_hertz> {};
+1 -1
View File
@@ -23,7 +23,7 @@
#include "units/dimension.h"
#include <utility>
using namespace std::experimental::units;
using namespace units;
namespace {
+4 -4
View File
@@ -25,7 +25,7 @@
#include <utility>
#include <chrono>
using namespace std::experimental::units;
using namespace units;
namespace {
@@ -44,7 +44,7 @@ namespace {
} // namespace
namespace std::experimental::units {
namespace units {
template<typename T>
inline constexpr bool treat_as_floating_point<my_value<T>> = std::is_floating_point_v<T>;
@@ -56,7 +56,7 @@ namespace std::experimental::units {
static constexpr my_value<T> min() { return std::numeric_limits<T>::lowest(); }
};
} // namespace std::experimental::units
} // namespace units
namespace std {
@@ -72,7 +72,7 @@ namespace std {
namespace {
using namespace std::experimental::units;
using namespace units;
// class invariants
+1 -1
View File
@@ -24,7 +24,7 @@
namespace {
using namespace std::experimental::units;
using namespace units;
template<Ratio R1, Ratio R2>
inline constexpr bool same = R1::num == R2::num && R1::den == R2::den;
+1 -1
View File
@@ -25,7 +25,7 @@
namespace {
using namespace std::experimental::units;
using namespace units;
template<typename... Types>
struct type_list;
+1 -1
View File
@@ -46,7 +46,7 @@
namespace {
using namespace std::experimental::units;
using namespace units;
/* ************** BASE DIMENSIONS **************** */