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

Add void as a possible type for functions return type

parent da1c135b
No related branches found
No related tags found
1 merge request!37Feature/language
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
template <typename T> template <typename T>
inline ASTNodeDataType ast_node_data_type_from = ASTNodeDataType::undefined_t; inline ASTNodeDataType ast_node_data_type_from = ASTNodeDataType::undefined_t;
template <>
inline ASTNodeDataType ast_node_data_type_from<void> = ASTNodeDataType::void_t;
template <> template <>
inline ASTNodeDataType ast_node_data_type_from<bool> = ASTNodeDataType::bool_t; inline ASTNodeDataType ast_node_data_type_from<bool> = ASTNodeDataType::bool_t;
template <> template <>
......
...@@ -29,10 +29,10 @@ MeshModule::MeshModule() ...@@ -29,10 +29,10 @@ MeshModule::MeshModule()
)); ));
this->_addBuiltinFunction("writeVTK", this->_addBuiltinFunction("writeVTK",
std::make_shared<BuiltinFunctionEmbedder<double, std::shared_ptr<IMesh>, std::string>>( std::make_shared<BuiltinFunctionEmbedder<void, std::shared_ptr<IMesh>, std::string>>(
std::function<double(std::shared_ptr<IMesh>, std::string)>{ std::function<void(std::shared_ptr<IMesh>, std::string)>{
[](std::shared_ptr<IMesh> p_mesh, std::string filename) -> double { [](std::shared_ptr<IMesh> p_mesh, std::string filename) -> void {
VTKWriter writer(filename, 0); VTKWriter writer(filename, 0);
switch (p_mesh->dimension()) { switch (p_mesh->dimension()) {
...@@ -58,8 +58,6 @@ MeshModule::MeshModule() ...@@ -58,8 +58,6 @@ MeshModule::MeshModule()
break; break;
} }
} }
return 0;
} }
})); }));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment