# How can I select a different frametitle template in beamer for the ToC frame?

So while designing a beamer theme, I came across the neat solution to select page specific templates through the pagestyle (Theme with a different footline for the titlepage). While this works for a lot of the templates, it does not work for the frametitle template, as you can see in my MWE:

\documentclass{beamer}

\defbeamertemplate*{frametitle}{regular}{Regular Frametitle}
\defbeamertemplate{frametitle}{special}{Special Frametitle}

\makeatletter
\setbeamertemplate{frametitle}[special]
\setbeamertemplate{footline}{Special Footline}
}
\makeatother

\begin{document}
\begin{frame}
\frametitle{~}
\end{frame}

\begin{frame}
\frametitle{~}
\end{frame}

\begin{frame}
\frametitle{~}

What I want to achieve is, that the framtitle is different through some sort of automatic for the slide that contains \tableofcontents and I therefore wanted to introduce a macro that selects a special page style and then ejects \tableofcontents. Maybe this is not the smartest solution, but is there another way to achieve the same behaviour for the frametitle as with this pagestyle selection?
The frame title is not typeset immediately when the command \frametitle is encountered. Rather, the argument of the command is stored internally and the frame title is only typeset when the complete frame has been read. This gives you access to both the ⟨frame title text⟩ and to the ⟨subframe title text⟩ that is possibly introduced using the \framesubtitle command.