title: Use of emplace function of std::variant in template
body: <p>I am experimenting with finate state machines and std::variant&lt;..&gt;</p>
  <p>std::variant will hold all possible states The states will be defined in State classes.</p>
  <p>I'd like to have std::monostate as the first type of State variant to use it as a &quot;do not change state&quot; value.
  So the definition would be : first type is std::monostate, second type is initial state of the fsm.</p>
  <p>As the std::variant is initialized to it's first element, I wanted to use emplace&lt;1&gt; in the constructor.</p>
  <pre><code>template &lt;typename StateVariant&gt;
  class fsm
  {
  public:
      StateVariant state;
      fsm()
      {
          state.emplace&lt;1&gt;();
      };
  };
  
  struct Initial{};
  struct Running{};
  
  using State = std::variant&lt;std::monostate,Initial,Running&gt;;
  
  fsm&lt;State&gt; myFSM;
  </code></pre>
  <p>But that gives compiletime error :</p>
  <pre><code>..\fsm_emplace.cpp: In constructor 'fsm&lt;StateVariant&gt;::fsm()':
  ..\fsm_emplace.cpp:15:20: error: expected primary-expression before ')' token
     15 |   state.emplace&lt;1&gt;();};
  </code></pre>
  <p>However, when i use the same construct in non template code :</p>
  <pre><code>State myState;
  
  void setup()
  {
      myState.emplace&lt;1&gt;();
  }
  </code></pre>
  <p>Is there a restriction of usage for the emplace function ?</p>