Skip to content

Commit

Permalink
fix: workaround for linking issues on the older clang compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
mpusz committed Jul 30, 2024
1 parent f088d54 commit f983c31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/include/mp-units/framework/expression_template.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ struct expr_fractions : decltype(expr_fractions_impl<OneType, type_list<Ts...>>(

// expr_make_spec
template<typename NumList, typename DenList, typename OneType, template<typename...> typename To>
[[nodiscard]] consteval auto expr_make_spec_impl()
[[nodiscard]] MP_UNITS_CONSTEVAL auto expr_make_spec_impl()
{
constexpr std::size_t num = type_list_size<NumList>;
constexpr std::size_t den = type_list_size<DenList>;
Expand All @@ -359,7 +359,7 @@ template<typename NumList, typename DenList, typename OneType, template<typename
*/
template<typename NumList, typename DenList, typename OneType, template<typename, typename> typename Pred,
template<typename...> typename To>
[[nodiscard]] consteval auto get_optimized_expression()
[[nodiscard]] MP_UNITS_CONSTEVAL auto get_optimized_expression()
{
using num_list = expr_consolidate<NumList>;
using den_list = expr_consolidate<DenList>;
Expand All @@ -380,7 +380,7 @@ template<typename NumList, typename DenList, typename OneType, template<typename
*/
template<template<typename...> typename To, typename OneType, template<typename, typename> typename Pred, typename Lhs,
typename Rhs>
[[nodiscard]] consteval auto expr_multiply(Lhs, Rhs)
[[nodiscard]] MP_UNITS_CONSTEVAL auto expr_multiply(Lhs, Rhs)
{
if constexpr (is_same_v<Lhs, OneType>) {
return Rhs{};
Expand Down

0 comments on commit f983c31

Please sign in to comment.