<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 --- - struct type alias with 'using' doesn't match correct constructor when defined inside the class"
   href="http://llvm.org/bugs/show_bug.cgi?id=22809">22809</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>struct type alias with 'using' doesn't match correct constructor when defined inside the class
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.5
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>qigopsrtv@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>#include <iostream>

struct c
{
    using t1 = struct {int z;};
    using t2 = struct {double z;};
    using t3 = struct {float z;};
    using t4 = struct {float z;};

    c(t1) { std::cout << 1; }
    c(t2) { std::cout << 2; }
    c(t3) { std::cout << 3; }
    c(t4) { std::cout << 4; }
};

int main()
{
    c a1{c::t1()};
    c a2{c::t2()};
    c a3{c::t3()};
    c a4{c::t4()};
    return 0;
}

This code should display '1234' but prints '4444' instead. If I move the alias
definitions outside the class it works as expected.

$ clang --version    
clang version 3.5.1 (tags/RELEASE_351/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix</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>