mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-05 21:24:27 +02:00
build: CTAD for quantity is not supported by clang
This commit is contained in:
@@ -383,8 +383,10 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
// CTAD
|
// CTAD
|
||||||
|
#if !UNITS_COMP_CLANG || UNITS_COMP_CLANG > 13
|
||||||
template<typename D, typename U, typename Rep>
|
template<typename D, typename U, typename Rep>
|
||||||
explicit(false) quantity(Rep&&) -> quantity<D, U, Rep>;
|
explicit(false) quantity(Rep&&) -> quantity<D, U, Rep>;
|
||||||
|
#endif
|
||||||
|
|
||||||
template<Representation Rep>
|
template<Representation Rep>
|
||||||
explicit(false) quantity(Rep) -> quantity<dim_one, one, Rep>;
|
explicit(false) quantity(Rep) -> quantity<dim_one, one, Rep>;
|
||||||
|
@@ -273,8 +273,10 @@ static_assert(get_length_derived_quantity() == 1_q_m);
|
|||||||
// CTAD
|
// CTAD
|
||||||
/////////
|
/////////
|
||||||
|
|
||||||
|
#if !UNITS_COMP_CLANG || UNITS_COMP_CLANG > 13
|
||||||
static_assert(std::is_same_v<decltype(units::aliases::isq::si::m(123))::rep, int>);
|
static_assert(std::is_same_v<decltype(units::aliases::isq::si::m(123))::rep, int>);
|
||||||
static_assert(std::is_same_v<decltype(units::aliases::isq::si::m(123.))::rep, double>);
|
static_assert(std::is_same_v<decltype(units::aliases::isq::si::m(123.))::rep, double>);
|
||||||
|
#endif
|
||||||
|
|
||||||
static_assert(is_same_v<decltype(quantity{length<metre, int>(123)}), length<metre, int>>);
|
static_assert(is_same_v<decltype(quantity{length<metre, int>(123)}), length<metre, int>>);
|
||||||
static_assert(is_same_v<decltype(quantity{speed<metre_per_second>(123)}), speed<metre_per_second>>);
|
static_assert(is_same_v<decltype(quantity{speed<metre_per_second>(123)}), speed<metre_per_second>>);
|
||||||
|
Reference in New Issue
Block a user