Using class-local type aliases in a template base class list <p>In this code:</p> <pre><code>template &lt;typename Pair&gt; struct EdgeRange : public std::pair&lt;decltype(valueIter(std::declval&lt;Pair&gt;().first)), decltype(valueIter(std::declval&lt;Pair&gt;().second))&gt; { using EntryFirst = decltype(valueIter(std::declval&lt;Pair&gt;().first)); using EntrySecond = decltype(valueIter(std::declval&lt;Pair&gt;().second)); EdgeRange(const Pair&amp; p): std::pair&lt;EntryFirst, EntrySecond&gt;(valueIter(p.first), valueIter(p.second)) {} }; </code></pre> <p>The <code>decltype</code> types are mentioned twice each. How can I eliminate this duplication without moving the types outside the class?</p>