title: Issue with unique_ptr
body: <p>Can anyone tell me what the issue is with this code? It throws an error:</p>
  <blockquote>
  <p>cannot convert argument 1 from '_Ty' to 'const day18::BaseInstruction &amp;'</p>
  </blockquote>
  <pre><code>    enum Command { snd, set, add, mul, mod, rcv, jgz };
      struct BaseInstruction {
          Command cmd;
          char reg;
          BaseInstruction(Command cmd, char reg)
              :cmd{cmd}, reg{reg}
          {}
      };
      template &lt;typename T&gt;
      struct Instruction : public BaseInstruction {
          T val;
          Instruction(Command cmd, char reg, T val)
              :BaseInstruction(cmd, reg), val{ val }
          {}
      };
      std::unique_ptr&lt;BaseInstruction&gt; getInstructionPtr(Command cmd, char reg, std::string valStr) {
          const static std::regex nr(&quot;-?\\d+&quot;);
          if (valStr.length() == 0) return std::make_unique&lt;BaseInstruction&gt;(new BaseInstruction(cmd, reg));
          if (std::regex_match(valStr, nr)) return std::make_unique&lt;BaseInstruction&gt;(new Instruction&lt;int&gt;(cmd, reg, std::stoi(valStr)));
          return std::make_unique&lt;BaseInstruction&gt;(new Instruction&lt;char&gt;(cmd, reg, valStr[0]));
      }
  </code></pre>