Commit 9582cede authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#1396 Fix three warnings (one more elegantly than previously where the warning...

#1396 Fix three warnings (one more elegantly than previously where the warning was neutralized locally).
parent 5cd9f8f6
Pipeline #70775 passed with stages
in 23 minutes and 20 seconds
......@@ -61,9 +61,9 @@ namespace MoReFEM
{
assert(Ndof > 0);
auto&& node_ptr = std::make_shared<Node>(shared_from_this(),
extended_unknown,
Ndof);
auto node_ptr = std::make_shared<Node>(shared_from_this(),
extended_unknown,
Ndof);
node_list_.push_back(node_ptr);
......
......@@ -33,7 +33,7 @@ namespace MoReFEM
return oconv.str();
}
return description;
return std::move(description);
}
......
......@@ -310,21 +310,10 @@ namespace MoReFEM
{
if constexpr (Utilities::IsSpecializationOf<std::tuple, T>())
{
# ifdef MOREFEM_LLVM_CLANG
PRAGMA_DIAGNOSTIC(push)
PRAGMA_DIAGNOSTIC(ignored "-Wunused-lambda-capture")
//< because LLVM clang issues an erroneous warning with 'this' capture below.
# endif // MOREFEM_LLVM_CLANG
// See https://stackoverflow.com/questions/16387354/template-tuple-calling-a-function-on-each-element.
std::apply([this](auto ...x)
{ (..., PushOnStack(x)); },
{ (..., this->PushOnStack(x)); },
value);
# ifdef MOREFEM_LLVM_CLANG
PRAGMA_DIAGNOSTIC(pop)
# endif // MOREFEM_LLVM_CLANG
}
else
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment