title: How to make_pair or make_tuple with one of the elements being a union?
body: <p>I have a union declaration, It is simple:</p>
  
  <pre><code>union VariableType
  {
      bool Bool;
      int64_t Int;
      double Double;
      std::string* String;
  };
  </code></pre>
  
  <p>In my header file I use this union inside some complex data types like this:</p>
  
  <pre><code>extern std::map&lt;std::string, std::tuple&lt;uint8_t, VariableType, VariableType&gt;&gt; PredefinedVariables;
  extern std::map&lt;std::string, std::pair&lt;uint8_t, VariableType&gt;&gt; UserVariables;
  </code></pre>
  
  <p>in a cpp file I try to initialize the maps with brace initialization as follows:</p>
  
  <pre><code>std::map&lt;std::string, std::tuple&lt;uint8_t, VariableType, VariableType&gt;&gt; PredefinedVariables
  {
      {"num_threads", std::make_tuple(1, {.Int = 1}, {.Int = 1})},
      {"commands_logging", std::make_tuple(0, {.Bool = false}, {.Bool = false})}
  };
  </code></pre>
  
  <p>I get the following error: </p>
  
  <pre><code>error: too many arguments to function ‘constexpr std::tuple&lt;typename std::__decay_and_strip&lt;_Elements&gt;::__type ...&gt; std::make_tuple(_Elements&amp;&amp; ...)
  [with _Elements = {}]’
           {"num_threads", std::make_tuple(1, {.Int = 1}, {.Int = 1})},
  </code></pre>
  
  <p>I tried to narrow it down, so I tested initializing a map of simpler types <code>std::map&lt;std::string, std::tuple&lt;uint8_t, uint64_t, uint64_t&gt;&gt;</code> with brace initialization and it works fine. I also tried initializing just a tuple or pair of the union type and it didn't work:</p>
  
  <pre><code>std::pair&lt;uint8_t, VariableType&gt; Tmp = std::make_pair(5, {.Int = 4});
  
  error: no matching function for call to ‘make_pair(int, &lt;brace-enclosed initializer list&gt;)’
           std::pair&lt;uint8_t, VariableType&gt; Tmp = std::make_pair(5, {.Int = 4});
  </code></pre>
  
  <p>I have also tried initializing the union on its own using the same way, no complaints!</p>
  
  <p>So why is the union initialization illegal inside <code>std::make_pair</code> or <code>std::make_tuple</code> but legal elsewhere? and how do I work around this?</p>
  
  <p>I'm using g++ version 6.2.0 with Ubuntu GLIBC 2.24-3ubuntu2. </p>