projection.cpp expected string serif/backend/mfem/projection/radial.hpp #include<expected> #include<string> #include"serif/backend/mfem/projection/radial.hpp" namespace{ namespaceprojection=serif::utils::projection; namespacebackend=projection::backend::mfem; structScalarProfile{ doubleoperator()(double)const; }; structCheckedProfile{ projection::RadialValueoperator()(double)const; }; structVectorProfile{ ::mfem::Vectoroperator()(double)const; }; structWrongFailure{ std::expected<double,int>operator()(double)const; }; static_assert(projection::RadialFunction<ScalarProfile>); static_assert(projection::RadialFunction<CheckedProfile>); static_assert(!projection::RadialFunction<VectorProfile>); static_assert(!projection::RadialFunction<WrongFailure>); static_assert(!projection::RadialFunction<int>); static_assert(std::same_as<decltype(backend::project_scalar( std::declval<::mfem::FiniteElementSpace&>(),ScalarProfile{} )),backend::ProjectionResult>); static_assert(std::same_as<decltype(backend::project_vector( std::declval<::mfem::FiniteElementSpace&>(),CheckedProfile{} )),backend::ProjectionResult>); }