title: C++20: Concepts of multiple types and its constraint, correct syntax?
body: <p>It is confirmed that in the upcoming <code>c++20</code> standard, according to <a href="https://www.reddit.com/r/cpp/comments/cfk9de/201907_cologne_iso_c_committee_trip_report_the/" rel="noreferrer">this reddit report</a> from the recent <a href="https://isocpp.org/std/meetings-and-participation/upcoming-meetings" rel="noreferrer">Cologne ISO C++ Meeting</a>, we will be able to specify a template's <a href="https://en.wikipedia.org/wiki/Concepts_(C%2B%2B)" rel="noreferrer"><strong>concept</strong></a> and for each class/function template, we will be able to set the <a href="https://en.cppreference.com/w/cpp/language/constraints" rel="noreferrer"><strong>constraints</strong></a> on its types. However, in documentations and tutorials (e.g. <a href="https://en.cppreference.com/w/cpp/language/constraints" rel="noreferrer">here</a>), I could not find the correct syntax for the multi-type use-case.</p>
  <hr />
  <p>Suppose we have a multi-type concept:</p>
  <pre class="lang-cpp prettyprint-override"><code>template&lt;typename T1, typename T2&gt;
  concept AreEqComparable = requires(T1 a, T2 b) {
      { a == b } -&gt; bool;
  };
  </code></pre>
  <p>Let's say, I want to define a simple comparison function between two different types. <strong>How can I do that?</strong> More specifically, what should I write in the <code>???</code> part of the code below:</p>
  <pre class="lang-cpp prettyprint-override"><code>???
  bool are_equal(T1 a, T2 b) { return a == b; }
  </code></pre>
  <p>I couldn't find any reference to this case in <a href="https://en.cppreference.com/w/cpp/language/constraints" rel="noreferrer">here</a>, <a href="https://cppdepend.com/blog/?p=524" rel="noreferrer">here</a>, and even <a href="https://en.wikipedia.org/wiki/Concepts_(C%2B%2B)" rel="noreferrer">here</a>. I have randomly tried something like:</p>
  <pre><code>/* 1 */ template&lt;AreEqComparable T1, T2&gt;
  /* 2 */ AreEqComparable&lt;T1, T2&gt;
  /* 3 */ template&lt;AreEqComparable&lt;T1, T2&gt;&gt;
  </code></pre>
  <p>But all of them throw syntax errors. I think the answer should lie somewhere in the specification <a href="http://www.stroustrup.com/good_concepts.pdf" rel="noreferrer">P0557</a> by <a href="https://en.wikipedia.org/wiki/Bjarne_Stroustrup" rel="noreferrer">Bjarne Stroustrup</a>, but I wasn't able to find it after a quick look.</p>