mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-03 20:34:26 +02:00
fix: unit_symbol()
and dimension_symbol()
returns now std::basic_string_view<CharT>
This commit is contained in:
@@ -309,7 +309,7 @@ constexpr auto dimension_symbol_result = dimension_symbol_impl<fmt, CharT>(D{});
|
||||
// TODO Refactor to `dimension_symbol(D, fmt)` when P1045: constexpr Function Parameters is available
|
||||
MP_UNITS_EXPORT template<dimension_symbol_formatting fmt = dimension_symbol_formatting{}, typename CharT = char,
|
||||
Dimension D>
|
||||
[[nodiscard]] consteval std::string_view dimension_symbol(D)
|
||||
[[nodiscard]] consteval std::basic_string_view<CharT> dimension_symbol(D)
|
||||
{
|
||||
return detail::dimension_symbol_result<fmt, CharT, D>.view();
|
||||
}
|
||||
|
@@ -920,7 +920,7 @@ constexpr auto unit_symbol_result = unit_symbol_impl<fmt, CharT>(U{});
|
||||
|
||||
// TODO Refactor to `unit_symbol(U, fmt)` when P1045: constexpr Function Parameters is available
|
||||
MP_UNITS_EXPORT template<unit_symbol_formatting fmt = unit_symbol_formatting{}, typename CharT = char, Unit U>
|
||||
[[nodiscard]] consteval std::string_view unit_symbol(U)
|
||||
[[nodiscard]] consteval std::basic_string_view<CharT> unit_symbol(U)
|
||||
{
|
||||
return detail::unit_symbol_result<fmt, CharT, U>.view();
|
||||
}
|
||||
|
Reference in New Issue
Block a user