Using generic lambda with trailing return type for isValid() fails with g++ <= 5.3
The NewtonSolver
uses this kind of SFINAE technique which results in a compiler error for g++ <= 5.3
This is a known bug which has been fixed in g++5.4: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66135
//! helper function detecting if an assembler supports partial reassembly
template<class Assembler>
auto supportsPartialReassembly(const Assembler& assembler) noexcept
{
using SolutionVector = typename Assembler::ResidualType;
using Reassembler = PartialReassembler<Assembler>;
return isValid([](auto&& a) -> decltype(
a.assembleJacobianAndResidual(std::declval<Assembler>(),
std::declval<const SolutionVector&>(),
std::declval<const Reassembler*>())
){})(assembler);
}