MCPcopy Create free account
hub / github.com/PatWie/CppNumericalSolvers / operator+

Function operator+

include/cppoptlib/function_expressions.h:406–415  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

404 typename = std::void_t<decltype(F::Differentiability),
405 decltype(G::Differentiability)>>
406auto operator+(const F& f, const G& g) {
407 static_assert(
408 std::is_same<typename F::ScalarType, typename G::ScalarType>::value,
409 "ScalarType must match in addition.");
410 static_assert(
411 F::Dimension == G::Dimension,
412 "Dimension mismatch: F and G must have the same compile-time dimension.");
413 constexpr auto TMode = MinDifferentiability<F, G>::value;
414 return AddExpression<F, G, TMode>(f, g);
415}
416
417// For subtraction.
418template <typename F, typename G,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected