title: How to concatenate two dictionaries with a += operator overload
body: <p>I would like to concatenate two dictionaries with a += operator overload using the method below.</p>
  
  <pre><code>static func += &lt;Key, Value&gt; ( left: inout [Key : Value], right: [Key : Value]) {
      for (key, value) in right {
          left.updateValue(value, forKey: key)
      }
  }
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>static func +=&lt;Key, Value&gt;( left: inout Dictionary&lt;Key ,Value&gt;, right: Dictionary&lt;Key, Value&gt;) {
      for (key, value) in right {
          left.updateValue(value, forKey: key)
      }
  }
  </code></pre>
  
  <p>With this implementation:</p>
  
  <pre><code>var properties = ["Key": "Value"]
  var newProperties = ["NewKey": "NewValue"]
  properties += newProperties
  </code></pre>
  
  <p>I get below error from xCode,</p>
  
  <blockquote>
    <p>Cannot convert value of type '[String: Any]' to expected argument type
    'inout [_ : <em>]' (aka 'inout'Dictionary&lt;</em>, _>)</p>
  </blockquote>
  
  <p>It doesn't work, can anyone can help me or if it's not possible, explain me why?</p>