title: Is this code legal in ISO C++?
body: <p>So I'm trying to implement function parameters which can be uninitialized. Here is the code which I have written. My question is if it's legal by the ISO C++ standard (version 14 if possible). </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;typeinfo&gt;
  
  using namespace std;
  
  template&lt;typename type&gt;
  
  struct nzeroinittmpliteral
  {
      nzeroinittmpliteral() { }    
      nzeroinittmpliteral(type arg) { d = arg; }    
      //nzeroinittmpliteral(const nzeroinittmpliteral &amp;) = delete;    
      operator type () &amp; { return d; }   
      operator type () &amp;&amp; { return d; }  
      type d;
  } ;
  
  void func(bool bIsPointerValid, nzeroinittmpliteral&lt;int *&gt; pVar = {})
  {
      if(bIsPointerValid)
      {
          cout &lt;&lt; *pVar &lt;&lt; endl;
      }
      else
      {
          pVar = new int;    
          *pVar = 8;    
          cout &lt;&lt; *pVar &lt;&lt; endl;    
          delete pVar;
      }
  }
  
  int main()
  {
      func(true, { (int *)&amp;(const int &amp;)int{9} } );    
      func(false);
  }
  </code></pre>