forked from mpusz/mp-units
VS2019 support added
This commit is contained in:
+39
-39
@@ -50,7 +50,7 @@ namespace detail {
|
||||
template <Quantity Q, typename UnaryOperation>
|
||||
inline static std::vector<typename Q::rep> fw_bl_pwc(std::initializer_list<Q>& bl, UnaryOperation fw)
|
||||
{
|
||||
using rep = Q::rep;
|
||||
using rep = TYPENAME Q::rep;
|
||||
std::vector<rep> w_bl;
|
||||
w_bl.reserve(bl.size());
|
||||
for (const Q& qty : bl) { w_bl.push_back(fw(qty)); }
|
||||
@@ -75,8 +75,8 @@ template<Quantity Q>
|
||||
requires std::integral<typename Q::rep>
|
||||
struct uniform_int_distribution : public std::uniform_int_distribution<typename Q::rep>
|
||||
{
|
||||
using rep = Q::rep;
|
||||
using base = std::uniform_int_distribution<rep>;
|
||||
using rep = TYPENAME Q::rep;
|
||||
using base = TYPENAME std::uniform_int_distribution<rep>;
|
||||
|
||||
uniform_int_distribution() : base() {}
|
||||
uniform_int_distribution(const Q& a, const Q& b) : base(a.count(), b.count()) {}
|
||||
@@ -95,8 +95,8 @@ template<Quantity Q>
|
||||
requires std::floating_point<typename Q::rep>
|
||||
struct uniform_real_distribution : public std::uniform_real_distribution<typename Q::rep>
|
||||
{
|
||||
using rep = Q::rep;
|
||||
using base = std::uniform_real_distribution<rep>;
|
||||
using rep = TYPENAME Q::rep;
|
||||
using base = TYPENAME std::uniform_real_distribution<rep>;
|
||||
|
||||
uniform_real_distribution() : base() {}
|
||||
uniform_real_distribution(const Q& a, const Q& b) : base(a.count(), b.count()) {}
|
||||
@@ -115,8 +115,8 @@ template<Quantity Q>
|
||||
requires std::integral<typename Q::rep>
|
||||
struct binomial_distribution : public std::binomial_distribution<typename Q::rep>
|
||||
{
|
||||
using rep = Q::rep;
|
||||
using base = std::binomial_distribution<rep>;
|
||||
using rep = TYPENAME Q::rep;
|
||||
using base = TYPENAME std::binomial_distribution<rep>;
|
||||
|
||||
binomial_distribution() : base() {}
|
||||
binomial_distribution(const Q& t, double p) : base(t.count(), p) {}
|
||||
@@ -134,8 +134,8 @@ template<Quantity Q>
|
||||
requires std::integral<typename Q::rep>
|
||||
struct negative_binomial_distribution : public std::negative_binomial_distribution<typename Q::rep>
|
||||
{
|
||||
using rep = Q::rep;
|
||||
using base = std::negative_binomial_distribution<rep>;
|
||||
using rep = TYPENAME Q::rep;
|
||||
using base = TYPENAME std::negative_binomial_distribution<rep>;
|
||||
|
||||
negative_binomial_distribution() : base() {}
|
||||
negative_binomial_distribution(const Q& k, double p) : base(k.count(), p) {}
|
||||
@@ -153,8 +153,8 @@ template<Quantity Q>
|
||||
requires std::integral<typename Q::rep>
|
||||
struct geometric_distribution : public std::geometric_distribution<typename Q::rep>
|
||||
{
|
||||
using rep = Q::rep;
|
||||
using base = std::geometric_distribution<rep>;
|
||||
using rep = TYPENAME Q::rep;
|
||||
using base = TYPENAME std::geometric_distribution<rep>;
|
||||
|
||||
geometric_distribution() : base() {}
|
||||
geometric_distribution(double p) : base(p) {}
|
||||
@@ -170,8 +170,8 @@ template<Quantity Q>
|
||||
requires std::integral<typename Q::rep>
|
||||
struct poisson_distribution : public std::poisson_distribution<typename Q::rep>
|
||||
{
|
||||
using rep = Q::rep;
|
||||
using base = std::poisson_distribution<rep>;
|
||||
using rep = TYPENAME Q::rep;
|
||||
using base = TYPENAME std::poisson_distribution<rep>;
|
||||
|
||||
poisson_distribution() : base() {}
|
||||
explicit poisson_distribution(double p) : base(p) {}
|
||||
@@ -187,8 +187,8 @@ template<Quantity Q>
|
||||
requires std::floating_point<typename Q::rep>
|
||||
struct exponential_distribution : public std::exponential_distribution<typename Q::rep>
|
||||
{
|
||||
using rep = Q::rep;
|
||||
using base = std::exponential_distribution<rep>;
|
||||
using rep = TYPENAME Q::rep;
|
||||
using base = TYPENAME std::exponential_distribution<rep>;
|
||||
|
||||
exponential_distribution() : base() {}
|
||||
explicit exponential_distribution(const rep& lambda) : base(lambda) {}
|
||||
@@ -204,8 +204,8 @@ template<Quantity Q>
|
||||
requires std::floating_point<typename Q::rep>
|
||||
struct gamma_distribution : public std::gamma_distribution<typename Q::rep>
|
||||
{
|
||||
using rep = Q::rep;
|
||||
using base = std::gamma_distribution<rep>;
|
||||
using rep = TYPENAME Q::rep;
|
||||
using base = TYPENAME std::gamma_distribution<rep>;
|
||||
|
||||
gamma_distribution() : base() {}
|
||||
gamma_distribution(const rep& alpha, const rep& beta) : base(alpha, beta) {}
|
||||
@@ -221,8 +221,8 @@ template<Quantity Q>
|
||||
requires std::floating_point<typename Q::rep>
|
||||
struct weibull_distribution : public std::weibull_distribution<typename Q::rep>
|
||||
{
|
||||
using rep = Q::rep;
|
||||
using base = std::weibull_distribution<rep>;
|
||||
using rep = TYPENAME Q::rep;
|
||||
using base = TYPENAME std::weibull_distribution<rep>;
|
||||
|
||||
weibull_distribution() : base() {}
|
||||
weibull_distribution(const rep& a, const rep& b) : base(a, b) {}
|
||||
@@ -238,8 +238,8 @@ template<Quantity Q>
|
||||
requires std::floating_point<typename Q::rep>
|
||||
struct extreme_value_distribution : public std::extreme_value_distribution<typename Q::rep>
|
||||
{
|
||||
using rep = Q::rep;
|
||||
using base = std::extreme_value_distribution<rep>;
|
||||
using rep = TYPENAME Q::rep;
|
||||
using base = TYPENAME std::extreme_value_distribution<rep>;
|
||||
|
||||
extreme_value_distribution() : base() {}
|
||||
extreme_value_distribution(const Q& a, const rep& b) : base(a.count(), b) {}
|
||||
@@ -257,8 +257,8 @@ template<Quantity Q>
|
||||
requires std::floating_point<typename Q::rep>
|
||||
struct normal_distribution : public std::normal_distribution<typename Q::rep>
|
||||
{
|
||||
using rep = Q::rep;
|
||||
using base = std::normal_distribution<rep>;
|
||||
using rep = TYPENAME Q::rep;
|
||||
using base = TYPENAME std::normal_distribution<rep>;
|
||||
|
||||
normal_distribution() : base() {}
|
||||
normal_distribution(const Q& mean, const Q& stddev) : base(mean.count(), stddev.count()) {}
|
||||
@@ -277,8 +277,8 @@ template<Quantity Q>
|
||||
requires std::floating_point<typename Q::rep>
|
||||
struct lognormal_distribution : public std::lognormal_distribution<typename Q::rep>
|
||||
{
|
||||
using rep = Q::rep;
|
||||
using base = std::lognormal_distribution<rep>;
|
||||
using rep = TYPENAME Q::rep;
|
||||
using base = TYPENAME std::lognormal_distribution<rep>;
|
||||
|
||||
lognormal_distribution() : base() {}
|
||||
lognormal_distribution(const Q& m, const Q& s) : base(m.count(), s.count()) {}
|
||||
@@ -297,8 +297,8 @@ template<Quantity Q>
|
||||
requires std::floating_point<typename Q::rep>
|
||||
struct chi_squared_distribution : public std::chi_squared_distribution<typename Q::rep>
|
||||
{
|
||||
using rep = Q::rep;
|
||||
using base = std::chi_squared_distribution<rep>;
|
||||
using rep = TYPENAME Q::rep;
|
||||
using base = TYPENAME std::chi_squared_distribution<rep>;
|
||||
|
||||
chi_squared_distribution() : base() {}
|
||||
explicit chi_squared_distribution(const rep& n) : base(n) {}
|
||||
@@ -314,8 +314,8 @@ template<Quantity Q>
|
||||
requires std::floating_point<typename Q::rep>
|
||||
struct cauchy_distribution : public std::cauchy_distribution<typename Q::rep>
|
||||
{
|
||||
using rep = Q::rep;
|
||||
using base = std::cauchy_distribution<rep>;
|
||||
using rep = TYPENAME Q::rep;
|
||||
using base = TYPENAME std::cauchy_distribution<rep>;
|
||||
|
||||
cauchy_distribution() : base() {}
|
||||
cauchy_distribution(const Q& a, const Q& b) : base(a.count(), b.count()) {}
|
||||
@@ -334,8 +334,8 @@ template<Quantity Q>
|
||||
requires std::floating_point<typename Q::rep>
|
||||
struct fisher_f_distribution : public std::fisher_f_distribution<typename Q::rep>
|
||||
{
|
||||
using rep = Q::rep;
|
||||
using base = std::fisher_f_distribution<rep>;
|
||||
using rep = TYPENAME Q::rep;
|
||||
using base = TYPENAME std::fisher_f_distribution<rep>;
|
||||
|
||||
fisher_f_distribution() : base() {}
|
||||
fisher_f_distribution(const rep& m, const rep& n) : base(m, n) {}
|
||||
@@ -351,8 +351,8 @@ template<Quantity Q>
|
||||
requires std::floating_point<typename Q::rep>
|
||||
struct student_t_distribution : public std::student_t_distribution<typename Q::rep>
|
||||
{
|
||||
using rep = Q::rep;
|
||||
using base = std::student_t_distribution<rep>;
|
||||
using rep = TYPENAME Q::rep;
|
||||
using base = TYPENAME std::student_t_distribution<rep>;
|
||||
|
||||
student_t_distribution() : base() {}
|
||||
explicit student_t_distribution(const rep& n) : base(n) {}
|
||||
@@ -368,8 +368,8 @@ template<Quantity Q>
|
||||
requires std::integral<typename Q::rep>
|
||||
struct discrete_distribution : public std::discrete_distribution<typename Q::rep>
|
||||
{
|
||||
using rep = Q::rep;
|
||||
using base = std::discrete_distribution<rep>;
|
||||
using rep = TYPENAME Q::rep;
|
||||
using base = TYPENAME std::discrete_distribution<rep>;
|
||||
|
||||
discrete_distribution() : base() {}
|
||||
|
||||
@@ -393,8 +393,8 @@ template<Quantity Q>
|
||||
requires std::floating_point<typename Q::rep>
|
||||
class piecewise_constant_distribution : public std::piecewise_constant_distribution<typename Q::rep>
|
||||
{
|
||||
using rep = Q::rep;
|
||||
using base = std::piecewise_constant_distribution<rep>;
|
||||
using rep = TYPENAME Q::rep;
|
||||
using base = TYPENAME std::piecewise_constant_distribution<rep>;
|
||||
|
||||
template <typename InputIt>
|
||||
piecewise_constant_distribution(const std::vector<rep>& i, InputIt first_w) :
|
||||
@@ -438,8 +438,8 @@ template<Quantity Q>
|
||||
requires std::floating_point<typename Q::rep>
|
||||
class piecewise_linear_distribution : public std::piecewise_linear_distribution<typename Q::rep>
|
||||
{
|
||||
using rep = Q::rep;
|
||||
using base = std::piecewise_linear_distribution<rep>;
|
||||
using rep = TYPENAME Q::rep;
|
||||
using base = TYPENAME std::piecewise_linear_distribution<rep>;
|
||||
|
||||
template <typename InputIt>
|
||||
piecewise_linear_distribution(const std::vector<rep>& i, InputIt first_w) :
|
||||
|
||||
Reference in New Issue
Block a user