diff --git a/include/mcc/mcc_utils.h b/include/mcc/mcc_utils.h index 51bab6d..4827e4c 100644 --- a/include/mcc/mcc_utils.h +++ b/include/mcc/mcc_utils.h @@ -68,7 +68,7 @@ constexpr static std::string_view trimSpaces(const char* r, TrimType type = Trim } template -std::optional numFromStr(R&& r) +static std::optional numFromStr(R&& r) requires((std::integral || std::floating_point) && std::same_as>>) { @@ -340,7 +340,10 @@ static std::string AZZD_rad2sxg(double az, double zd, std::string_view delim = " // "12:43:23.423, 102:43:12.124" // " 12.3453467, 102:43:12.124 " template -std::pair parseAnglePair(R&& str, bool hms1 = false, bool hms2 = false, std::string_view delim = ",") +static std::pair parseAnglePair(R&& str, + bool hms1 = false, + bool hms2 = false, + std::string_view delim = ",") { std::pair res{std::numeric_limits::quiet_NaN(), std::numeric_limits::quiet_NaN()}; auto found1 = std::ranges::search(std::forward(str), delim); @@ -382,7 +385,10 @@ std::pair parseAnglePair(R&& str, bool hms1 = false, bool hms2 = // 1st element: difference along co-latitude axis // 2nd element: distance -std::tuple distanceOnSphere(double co_lon1, double co_lat1, double co_lon2, double co_lat2) +static std::tuple distanceOnSphere(double co_lon1, + double co_lat1, + double co_lon2, + double co_lat2) { std::tuple res{};