Skip to content
Snippets Groups Projects
Commit 4143be94 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Fix clang compilation issues and warnings

parent 8e2b603e
No related branches found
No related tags found
1 merge request!89Add missing compatibility check when affecting lists to R^d or R^dxd
......@@ -19,6 +19,9 @@ class DiscreteFunctionP0 : public IDiscreteFunction
static constexpr HandledItemDataType handled_data_type = HandledItemDataType::value;
friend class DiscreteFunctionP0<Dimension, std::add_const_t<DataType>>;
friend class DiscreteFunctionP0<Dimension, std::remove_const_t<DataType>>;
private:
std::shared_ptr<const MeshType> m_mesh;
CellValue<DataType> m_cell_values;
......
......@@ -22,6 +22,9 @@ class DiscreteFunctionP0Vector : public IDiscreteFunction
static constexpr HandledItemDataType handled_data_type = HandledItemDataType::vector;
friend class DiscreteFunctionP0Vector<Dimension, std::add_const_t<DataType>>;
friend class DiscreteFunctionP0Vector<Dimension, std::remove_const_t<DataType>>;
static_assert(std::is_arithmetic_v<DataType>, "DiscreteFunctionP0Vector are only defined for arithmetic data type");
private:
......
......@@ -19,7 +19,8 @@ TEST_CASE("DiscreteFunctionDescriptorP0", "[scheme]")
REQUIRE(descriptor_copy.type() == DiscreteFunctionType::P0);
}
DiscreteFunctionDescriptorP0 descriptor_move{std::move(DiscreteFunctionDescriptorP0{})};
DiscreteFunctionDescriptorP0 temp;
DiscreteFunctionDescriptorP0 descriptor_move{std::move(temp)};
REQUIRE(descriptor_move.type() == DiscreteFunctionType::P0);
}
}
......@@ -19,7 +19,8 @@ TEST_CASE("DiscreteFunctionDescriptorP0Vector", "[scheme]")
REQUIRE(descriptor_copy.type() == DiscreteFunctionType::P0Vector);
}
DiscreteFunctionDescriptorP0Vector descriptor_move{std::move(DiscreteFunctionDescriptorP0Vector{})};
DiscreteFunctionDescriptorP0Vector temp;
DiscreteFunctionDescriptorP0Vector descriptor_move{std::move(temp)};
REQUIRE(descriptor_move.type() == DiscreteFunctionType::P0Vector);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment