<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 --- - using T::T inside template <typename T> not accepted,leads to bogus errors."
   href="http://llvm.org/bugs/show_bug.cgi?id=15852">15852</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>using T::T inside template <typename T> not accepted,leads to bogus errors.
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>benjamin.redelings@duke.edu
          </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>Created <span class=""><a href="attachment.cgi?id=10429" name="attach_10429" title="Test case">attachment 10429</a> <a href="attachment.cgi?id=10429&action=edit" title="Test case">[details]</a></span>
Test case

The attached test case leads to the following compilation errors:

$ clang++ -std=c++11 test.C
test.C:32:17: error: template argument for template type parameter must be a
type
  Box(const Box<T>&) = default;
                ^
test.C:11:19: note: template parameter is declared here
template<typename T>
                  ^
test.C:33:22: error: unknown type name 'T'
  explicit Box(const T& t):T(t) {}
                     ^
test.C:15:41: error: template argument for template type parameter must be a
type
  Box<T>* clone() const {return new Box<T>(*this);}
                                        ^
test.C:11:19: note: template parameter is declared here
template<typename T>
                  ^
test.C:29:12: error: no member named 'T' in 'A'
  using T::T;
        ~~~^
test.C:38:10: note: in instantiation of template class 'Box<A>' requested here
  Box<A> a;
         ^
4 errors generated.

These errors go away if "using T::T" is commented out.</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>