Skip to content

Commit

Permalink
fix: unit_symbol() and dimension_symbol() returns now `std::basic…
Browse files Browse the repository at this point in the history
…_string_view<CharT>`
  • Loading branch information
mpusz committed Dec 29, 2024
1 parent e94df6e commit 6f0a81a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/include/mp-units/framework/dimension.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/include/mp-units/framework/unit.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 6f0a81a

Please sign in to comment.