user23994: So I want to do something like this:
template<int PIN, int CHANNEL>
void initPin() {
    attachInterrupt(PIN, rising<PIN, CHANNEL>, RISING);
}


template<int PIN, int CHANNEL>
void rising() {
    startTimes[CHANNEL] = micros();
    attachInterrupt(PIN, falling<PIN, CHANNEL>, FALLING);
}

template<int PIN, int CHANNEL>
void falling() {
    values[CHANNEL] = micros() - startTimes[CHANNEL];
    attachInterrupt(PIN, rising<PIN, CHANNEL>, RISING);
}

but the compiler gives me this error
no matches converting function ‘rising’ to type ‘void (*)()’

Can I even do this, or do I have to write all the functions by myself?

user13432: Try this:
template<int PIN, int CHANNEL> void initPin() {
    attachInterrupt(PIN, rising<PIN, CHANNEL>, RISING);
}


template<int PIN, int CHANNEL> void rising() {
    startTimes[CHANNEL] = micros();
    attachInterrupt(PIN, falling<PIN, CHANNEL>, FALLING);
}

template<int PIN, int CHANNEL> void falling() {
    values[CHANNEL] = micros() - startTimes[CHANNEL];
    attachInterrupt(PIN, rising<PIN, CHANNEL>, RISING);
}

The problem is actually the Arduino preprocessor. It adds illegal forward declarations if template functions are formated as your original code. 

user63408: Please have a look implementation 
https://github.com/Yurik72/SimpleButton
There are implementation how to assign function with arguments to interrupt handler

23994: <p>So I want to do something like this:</p>

<pre><code>template&lt;int PIN, int CHANNEL&gt;
void initPin() {
    attachInterrupt(PIN, rising&lt;PIN, CHANNEL&gt;, RISING);
}


template&lt;int PIN, int CHANNEL&gt;
void rising() {
    startTimes[CHANNEL] = micros();
    attachInterrupt(PIN, falling&lt;PIN, CHANNEL&gt;, FALLING);
}

template&lt;int PIN, int CHANNEL&gt;
void falling() {
    values[CHANNEL] = micros() - startTimes[CHANNEL];
    attachInterrupt(PIN, rising&lt;PIN, CHANNEL&gt;, RISING);
}
</code></pre>

<p>but the compiler gives me this error</p>

<pre><code>no matches converting function ‘rising’ to type ‘void (*)()’
</code></pre>

<p>Can I even do this, or do I have to write all the functions by myself?</p>
 13432: <p>Try this:</p>

<pre><code>template&lt;int PIN, int CHANNEL&gt; void initPin() {
    attachInterrupt(PIN, rising&lt;PIN, CHANNEL&gt;, RISING);
}


template&lt;int PIN, int CHANNEL&gt; void rising() {
    startTimes[CHANNEL] = micros();
    attachInterrupt(PIN, falling&lt;PIN, CHANNEL&gt;, FALLING);
}

template&lt;int PIN, int CHANNEL&gt; void falling() {
    values[CHANNEL] = micros() - startTimes[CHANNEL];
    attachInterrupt(PIN, rising&lt;PIN, CHANNEL&gt;, RISING);
}
</code></pre>

<p>The problem is actually the Arduino preprocessor. It adds illegal forward declarations if template functions are formated as your original code. </p>
 63408: <p>Please have a look implementation 
<a href="https://github.com/Yurik72/SimpleButton" rel="nofollow noreferrer">https://github.com/Yurik72/SimpleButton</a></p>

<p>There are implementation how to assign function with arguments to interrupt handler</p>
