 <p>One thing you could do is take advantage of the <code>std::minmax</code> overload that takes a <code>std::initializer_list&lt;T&gt;</code> and returns a <code>std::pair&lt;T,T&gt;</code>. Using that you could have</p> <pre><code>int main() { const int a = 10, b = 20; static_assert(std::minmax({2, 1}) == std::make_pair(1, 2)); static_assert(std::minmax({a, b}) == std::make_pair(a, b)); } </code></pre> <p>Which <a href="http://coliru.stacked-crooked.com/a/d4630df7a71f182f">will compile</a> and allows you to get rid of <code>make_cref_pair</code>. It does call <code>std::minmax_element</code> so I am not sure if this decreases the efficiency or not.</p>