<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Cannot initialize const reference function argument with braced-init-list"
   href="http://llvm.org/bugs/show_bug.cgi?id=16285">16285</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Cannot initialize const reference function argument with braced-init-list
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.2
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++11
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>vanboxem.ruben@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This code fails when using Clang 3.2 and current ToT, and using GCC 4.6 and
4.8's libstdc++:

#include <unordered_set>

void lol(const std::unordered_set<double>& yodel = {}) {}

int main()
{
  lol();
}

GCC accepts this since 4.7. Also see:

<a href="http://stackoverflow.com/questions/6615823/uniform-initializer-used-in-default-argument-to-const-reference">http://stackoverflow.com/questions/6615823/uniform-initializer-used-in-default-argument-to-const-reference</a>
<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3139.pdf">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3139.pdf</a></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>