mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-03 20:34:26 +02:00
refactor: Repetitive inline constexpr
removed as no longer needed
Not needed anymore as stated in cplusplus/draft#4601
This commit is contained in:
@@ -50,7 +50,7 @@ import mp_units;
|
||||
|
||||
template<class T>
|
||||
requires mp_units::is_scalar<T>
|
||||
inline constexpr bool mp_units::is_vector<T> = true;
|
||||
constexpr bool mp_units::is_vector<T> = true;
|
||||
|
||||
using namespace mp_units;
|
||||
using namespace mp_units::si::unit_symbols;
|
||||
|
@@ -44,10 +44,10 @@ template<typename Rep = double>
|
||||
using vector = STD_LA::fixed_size_column_vector<Rep, 3>;
|
||||
|
||||
template<class Rep>
|
||||
inline constexpr bool mp_units::treat_as_floating_point<vector<Rep>> = mp_units::treat_as_floating_point<Rep>;
|
||||
constexpr bool mp_units::treat_as_floating_point<vector<Rep>> = mp_units::treat_as_floating_point<Rep>;
|
||||
|
||||
template<typename Rep>
|
||||
inline constexpr bool mp_units::is_vector<vector<Rep>> = true;
|
||||
constexpr bool mp_units::is_vector<vector<Rep>> = true;
|
||||
|
||||
template<typename Rep>
|
||||
std::ostream& operator<<(std::ostream& os, const vector<Rep>& v)
|
||||
@@ -301,7 +301,7 @@ TEST_CASE("vector quantity", "[la]")
|
||||
|
||||
template<class T>
|
||||
requires mp_units::is_scalar<T>
|
||||
inline constexpr bool mp_units::is_vector<T> = true;
|
||||
constexpr bool mp_units::is_vector<T> = true;
|
||||
|
||||
TEST_CASE("vector of quantities", "[la]")
|
||||
{
|
||||
|
@@ -42,9 +42,9 @@ using namespace mp_units;
|
||||
using namespace mp_units::angular;
|
||||
using namespace mp_units::angular::unit_symbols;
|
||||
|
||||
inline constexpr struct half_revolution final : named_unit<"hrev", mag_pi * radian> {
|
||||
constexpr struct half_revolution final : named_unit<"hrev", mag_pi * radian> {
|
||||
} half_revolution;
|
||||
inline constexpr auto hrev = half_revolution;
|
||||
constexpr auto hrev = half_revolution;
|
||||
|
||||
// constexpr auto revb6 = mag_ratio<1,3> * mag_pi * rad;
|
||||
|
||||
|
Reference in New Issue
Block a user