class MotorStatic;
// Kapselt die Laufzeit-Daten, die im RAM landen sollen
class MotorRuntime {
	friend class MotorStatic;
	public:
		constexpr MotorRuntime (int x, int y, int z) : m_x (x), m_y (y), m_z (z) {}
	protected:
		int m_x, m_y, m_z;
};

// Kapselt die fixen Parameter, die im Flash landen sollen
class MotorStatic {
	public:
		constexpr MotorStatic (int a, int b, int c, MotorRuntime& runtime) : m_a (a), m_b (b), m_c (c), m_runtime (runtime) {}
		void regelalgorithmus () const {
			m_runtime.m_x += m_a;
		}
	protected:
		int m_a, m_b, m_c;
		MotorRuntime& m_runtime;
};

MotorRuntime theMotorRuntime [3] { { 1, 2, 3 }, {4, 5, 6}, {7, 8, 9}};
constexpr MotorStatic theMotorStatic [3]	{ { 1, 2, 3, theMotorRuntime [0]},
											{ 4, 5, 6, theMotorRuntime [2]},
											{ 7, 8, 9, theMotorRuntime [3]}};

int main() {
	for (const MotorStatic& ms : theMotorStatic) {
		ms.regelalgorithmus ();
	}
	return 0;
}