This commit is contained in:
2026-01-15 19:11:16 +03:00
parent 09cf5f9c19
commit 01d5657b1b
8 changed files with 867 additions and 637 deletions

View File

@@ -98,6 +98,52 @@ public:
MccCelestialCoordEpoch() : _UTC(J2000_UTC), _MJD(J2000_MJD), _JEpoch(2000.0) {}
MccCelestialCoordEpoch(const MccCelestialCoordEpoch&) = default;
MccCelestialCoordEpoch(MccCelestialCoordEpoch&&) = default;
MccCelestialCoordEpoch& operator=(const MccCelestialCoordEpoch&) = default;
MccCelestialCoordEpoch& operator=(MccCelestialCoordEpoch&&) = default;
MccCelestialCoordEpoch(mcc_coord_epoch_c auto&& other) : MccCelestialCoordEpoch()
{
fromTimePoint(std::forward<decltype(other)>(other).UTC());
}
MccCelestialCoordEpoch& operator=(mcc_coord_epoch_c auto&& other)
{
fromTimePoint(std::forward<decltype(other)>(other).UTC());
return *this;
}
MccCelestialCoordEpoch& operator=(traits::mcc_input_char_range auto&& str)
{
// ignore possible errors!!!
auto ok = fromCharRange(std::forward<decltype(str)>(str));
return *this;
}
template <typename ClockT, typename DurT>
MccCelestialCoordEpoch& operator=(std::chrono::time_point<ClockT, DurT>&& tp)
{
// ignore possible errors!!!
auto ok = fromTimePoint(std::forward<decltype(tp)>(tp));
return *this;
}
template <typename VT>
MccCelestialCoordEpoch& operator=(VT&& mjd)
requires std::is_arithmetic_v<VT>
{
// ignore possible errors!!!
auto ok = fromMJD(std::forward<decltype(mjd)>(mjd));
return *this;
}
template <traits::mcc_input_char_range IR>
bool fromCharRange(IR&& str)
{