title: template with lambda as unique default parameter on each instantiation
body: <p>I'm looking for a way to automatically make default template parameter be unique each time a template is instantiated. Since unnamed function objects created by lambda expressions have different types I thought of adopting them somehow. With recent changes to standard daft removing <em>"A lambda-expression shall not appear in ... a template-argument"</em> restriction (see <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0315r3.pdf" rel="noreferrer">Wording for lambdas in unevaluated contexts</a>) it seemed like a good idea. So I wrote the following kinda working snippet that <a href="https://godbolt.org/z/mFpdp8" rel="noreferrer">compiles on recent gcc and clang</a>:</p>
  
  <pre><code>#include &lt;type_traits&gt;
  
  template&lt;void ( * ) (void) = [](){}&gt; class
  unique final {};
  
  static_assert(false == ::std::is_same_v&lt;unique&lt;&gt;, unique&lt;&gt;&gt;);
  
  int main()
  {
      return 0;
  }
  </code></pre>
  
  <p>Is this a viable approach or one of those "ill-formed, no diagnostic is required" cases?</p>
  
  <p>Some additional context: I want to use this to implement Ada-style strong type definitions that should work in a single translation unit without manually inventing unique tags that would be otherwise unused:</p>
  
  <pre><code>struct _tag_WowInt {};
  using Int = type&lt;int, _tag_WowInt&gt;;
  struct _tag_SoUnique {};
  using DifferentInt = type&lt;int, _tag_SoUnique&gt;;
  </code></pre>
  
  <p>Upd1: I would like to mention that approaches involving <code>__COUNTER__</code> or similar macros won't work in general case because they will be expanded by preprocessor only once and <a href="https://wandbox.org/permlink/5V7TfJT1xpS3yIBg" rel="noreferrer">won't yield unique types when used inside of template for example</a>.</p>