19#ifndef CORE_CONSTRAINTS_DETAIL_BIND_COUPLING_HPP
20#define CORE_CONSTRAINTS_DETAIL_BIND_COUPLING_HPP
28template <
typename Coupling,
typename Particle>
struct BindCoupling {
29 static const constexpr bool is_linear = Coupling::is_linear;
34 BindCoupling(
const Coupling &c,
const Particle &p) : c(c), p(p) {}
36 template <
typename T>
auto operator()(
const T &x)
const ->
decltype(c(p, x)) {
41template <
typename Coupling,
typename Particle>
42BindCoupling<Coupling, Particle> make_bind_coupling(
const Coupling &c,
44 return BindCoupling<Coupling, Particle>{c, p};