<html>
    <head>
      <base href="https://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 --- - Using declaration refers into C, which is a base class (alias) of D, but it is not recognized as valid."
   href="https://llvm.org/bugs/show_bug.cgi?id=27961">27961</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Using declaration refers into C, which is a base class (alias) of D, but it is not recognized as valid.
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.8
          </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>michele.caini@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Consider the following code:

    struct B { };

    template<typename...>
    struct D;

    template<typename T, typename U, typename... A>
    struct D<T, U, A...>: D<U, A...> {
        using C = D<U, A...>; // (1)
        // using D<U, A...>::D; // (2)
        // using C::C  // (3)
        using C::D;
    };

    template<typename T>
    struct D<T>: T { using T::T; };

    int main() {
        D<int, double, B> d{};
    }

Lines (2) and (3) work as expected, while (1) gives the following errors:

    11 : error: dependent using declaration resolved to type without 'typename'
    using C::D;

    [...]

    11 : error: using declaration refers into 'C::', which is not a base class
of 'D<int, double, B>'
    using C::D;

C is an alias of D<U, A...>, that is a base class of D<T, U, A...>, thus even
(1) should compile.
Actually, GCC compiles the example above without errors.</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>