title: Using the upcoming C++ reflection facilities to print the full name of a type
body: <p>Currently, one can use <code>__PRETTY_FUNCTION__</code> to display a template type under <code>gcc</code>, and <code>clang</code>:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  template &lt;class T&gt;
  void print_type() {
    std::cout &lt;&lt; __PRETTY_FUNCTION__ &lt;&lt; std::endl;
  }
  
  int main(int argc, char* argv[]) {
    print_type&lt;const volatile int&amp;&gt;();
    return 0;
  }
  </code></pre>
  
  <p>Will output:</p>
  
  <pre><code>void print_type() [with T = const volatile int&amp;]
  </code></pre>
  
  <p>With the <a href="https://cplusplus.github.io/reflection-ts/draft.pdf" rel="nofollow noreferrer">reflection TS</a> coming and reflection facilities in C++, I was wondering what the syntax would look like to be able to do something similar.</p>
  
  <p>Note: as the reflection TS has not been voted in yet, I am only looking for a "probable" syntax.</p>