Skip to content
Snippets Groups Projects

Fix builtin function call disambiguation

1 file
+ 6
0
Compare changes
  • Side-by-side
  • Inline
@@ -579,6 +579,8 @@ template <typename BinOperatorT, typename DataType, typename DiscreteFunctionT>
std::shared_ptr<const IDiscreteFunction>
applyBinaryOperationWithRightConstant(const DiscreteFunctionT& f, const DataType& a)
{
Assert(f.descriptor().type() != DiscreteFunctionType::P0);
using lhs_data_type = std::decay_t<typename DiscreteFunctionT::data_type>;
using rhs_data_type = std::decay_t<DataType>;
@@ -600,6 +602,10 @@ template <typename BinOperatorT, size_t Dimension, typename DataType>
std::shared_ptr<const IDiscreteFunction>
applyBinaryOperationWithRightConstant(const std::shared_ptr<const IDiscreteFunction>& f, const DataType& a)
{
if (f->descriptor().type() != DiscreteFunctionType::P0) {
throw NormalError(invalid_operands(f, a));
}
switch (f->dataType()) {
case ASTNodeDataType::bool_t:
case ASTNodeDataType::unsigned_int_t:
Loading