Skip to content

Commit

Permalink
Fix template keyword ambiguity.
Browse files Browse the repository at this point in the history
  • Loading branch information
HaxyM authored Aug 19, 2024
1 parent c22a7eb commit 93655e3
Showing 1 changed file with 34 additions and 2 deletions.
36 changes: 34 additions & 2 deletions include/crap/numeric.d/innerproductvalue.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,43 @@ namespace crap
constexpr const static Type value = transform2Value <Type, multiplicative, Values1...> :: template
with <Values2...> :: template type <Reductor> :: value;
using value_type = decltype(value);
constexpr operator value_type () const noexcept { return value; }
constexpr operator value_type () const noexcept;
#if (crap_lib_integral_constant_callable >= 201304L)
constexpr value_type operator () () const noexcept { return value; }
constexpr value_type operator () () const noexcept;
#endif
};
}

template <class Type, template <Type...> class AdditiveOperator, template <Type...> class MultiplicativeOperator, Type ... Values1>
template <Type ... Values2>
inline constexpr crap :: innerProductValue <Type, AdditiveOperator, MultiplicativeOperator, Values1...> ::
with <Values2...> :: operator typename
#if (!defined(__clang__) && defined(__GNUC__) && (__GNUC__ < 10))
crap :: innerProductValue <Type, AdditiveOperator, MultiplicativeOperator, Values1...> :: template
#else
crap :: innerProductValue <Type, AdditiveOperator, MultiplicativeOperator, Values1...> ::
#endif
with <Values2...> :: value_type () const noexcept
{
return crap :: innerProductValue <Type, AdditiveOperator, MultiplicativeOperator, Values1...> :: with <Values2...> :: value;
};
#if (crap_lib_integral_constant_callable >= 201304L)

template <class Type, template <Type...> class AdditiveOperator, template <Type...> class MultiplicativeOperator, Type ... Values1>
template <Type ... Values2>
inline constexpr typename
//TODO: Add version check if changed by clang.
#if defined(__clang__) || (!defined(__clang__) && defined(__GNUC__) && (__GNUC__ < 10))
crap :: innerProductValue <Type, AdditiveOperator, MultiplicativeOperator, Values1...> :: template
#else
crap :: innerProductValue <Type, AdditiveOperator, MultiplicativeOperator, Values1...> ::
#endif
with <Values2...> :: value_type
crap :: innerProductValue <Type, AdditiveOperator, MultiplicativeOperator, Values1...> ::
with <Values2...> :: operator () () const noexcept
{
return crap :: innerProductValue <Type, AdditiveOperator, MultiplicativeOperator, Values1...> :: with <Values2...> :: value;
};
#endif
#endif

0 comments on commit 93655e3

Please sign in to comment.