fix compilation with GCC version<15
This commit is contained in:
@@ -35,10 +35,7 @@ struct MccJulianDay {
|
||||
|
||||
MccJulianDay(double jd) : mjd(jd - MJD0) {}
|
||||
|
||||
constexpr operator double() const
|
||||
{
|
||||
return MccJulianDay::MJD0 + mjd;
|
||||
}
|
||||
constexpr operator double() const { return MccJulianDay::MJD0 + mjd; }
|
||||
|
||||
MccJulianDay& operator=(double jd)
|
||||
{
|
||||
@@ -47,17 +44,11 @@ struct MccJulianDay {
|
||||
return *this;
|
||||
}
|
||||
|
||||
double MJD() const
|
||||
{
|
||||
return mjd;
|
||||
}
|
||||
double MJD() const { return mjd; }
|
||||
|
||||
constexpr auto operator<=>(const MccJulianDay&) const = default;
|
||||
|
||||
constexpr auto operator<=>(double v) const
|
||||
{
|
||||
return v <=> (MccJulianDay::MJD0 + mjd);
|
||||
};
|
||||
constexpr auto operator<=>(double v) const { return v <=> (MccJulianDay::MJD0 + mjd); };
|
||||
|
||||
protected:
|
||||
double mjd{51544.5}; // J2000.0
|
||||
@@ -229,10 +220,7 @@ public:
|
||||
return _MJD;
|
||||
}
|
||||
|
||||
double MJD() const
|
||||
{
|
||||
return _MJD;
|
||||
}
|
||||
double MJD() const { return _MJD; }
|
||||
|
||||
template <typename DT>
|
||||
std::chrono::sys_time<DT> UTC() const
|
||||
@@ -240,10 +228,7 @@ public:
|
||||
return std::chrono::time_point_cast<DT>(_UTC);
|
||||
}
|
||||
|
||||
std::chrono::system_clock::time_point UTC() const
|
||||
{
|
||||
return _UTC;
|
||||
}
|
||||
std::chrono::system_clock::time_point UTC() const { return _UTC; }
|
||||
|
||||
|
||||
template <traits::mcc_output_char_range R>
|
||||
@@ -268,20 +253,11 @@ public:
|
||||
return r;
|
||||
}
|
||||
|
||||
std::string JEpoch(uint8_t prec = 0) const
|
||||
{
|
||||
return JEpoch<std::string>(prec);
|
||||
}
|
||||
std::string JEpoch(uint8_t prec = 0) const { return JEpoch<std::string>(prec); }
|
||||
|
||||
auto operator<=>(const MccCelestialCoordEpoch& rhs) const
|
||||
{
|
||||
return _UTC <=> rhs._UTC;
|
||||
}
|
||||
auto operator<=>(const MccCelestialCoordEpoch& rhs) const { return _UTC <=> rhs._UTC; }
|
||||
|
||||
auto operator==(const MccCelestialCoordEpoch& rhs) const
|
||||
{
|
||||
return _UTC == rhs._UTC;
|
||||
}
|
||||
auto operator==(const MccCelestialCoordEpoch& rhs) const { return _UTC == rhs._UTC; }
|
||||
|
||||
protected:
|
||||
std::chrono::system_clock::time_point _UTC;
|
||||
@@ -635,15 +611,9 @@ public:
|
||||
|
||||
virtual ~MccCoordinateSerializer() = default;
|
||||
|
||||
void setFormat(SerializedCoordFormat fmt)
|
||||
{
|
||||
_currentFormat = fmt;
|
||||
}
|
||||
void setFormat(SerializedCoordFormat fmt) { _currentFormat = fmt; }
|
||||
|
||||
void setPrecision(SexagesimalCoordPrec prec)
|
||||
{
|
||||
_currentPrec = std::move(prec);
|
||||
}
|
||||
void setPrecision(SexagesimalCoordPrec prec) { _currentPrec = std::move(prec); }
|
||||
|
||||
template <traits::mcc_input_char_range R>
|
||||
void setDelimiter(R&& delim)
|
||||
@@ -744,6 +714,7 @@ public:
|
||||
toSexagesimalDeg(bytes, value.Y);
|
||||
}
|
||||
|
||||
std::format_to(std::back_inserter(bytes), "{}", _delimiter);
|
||||
serializePairKindTimePoint(value, bytes);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -34,7 +34,7 @@ int main()
|
||||
std::cout << "msg.par[2] = <" << msg2.param(2) << ">\n";
|
||||
|
||||
auto p2 = msg2.paramValue<std::chrono::seconds>(2);
|
||||
std::cout << "msg.par[2] = <" << p2.value_or({}) << ">\n";
|
||||
std::cout << "msg.par[2] = <" << p2.value_or(std::chrono::seconds{}) << ">\n";
|
||||
|
||||
std::cout << "msg.par[3] = <";
|
||||
auto p3 = msg2.paramValue<decltype(vd)>(3);
|
||||
|
||||
Reference in New Issue
Block a user