<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 --- - Wrong "too few template arguments for class template""
   href="http://llvm.org/bugs/show_bug.cgi?id=18783">18783</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Wrong "too few template arguments for class template"
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </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++
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>marc.glisse@normalesup.org
          </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>(If we replace type_traits with boost, this is C++03)

#include <type_traits>

template<class,class> struct typeset;
template<class H=void, class T=typename
std::conditional<std::is_same<H,void>::value, void, typeset<void, void> >::type
>
struct typeset {
  typedef typeset type;
};
template<> struct typeset<> {
  typedef typeset type;
  template<class X> struct add : typeset<X> {};
};

typedef typeset<>::add<int>::type XXX;


t.cc:11:34: error: too few template arguments for class template 'typeset'
  template<class X> struct add : typeset<X> {};
                                 ^
t.cc:3:30: note: template is declared here
template<class,class> struct typeset;
~~~~~~~~~~~~~~~~~~~~~        ^
t.cc:14:9: error: no type named 'type' in 'typeset<void, void>::add<int>'; did
      you mean 'typeset<>::type'?
typedef typeset<>::add<int>::type XXX;
        ^~~~~~~~~~~~~~~~~~~~~~~~~
        typeset<>::type
t.cc:10:19: note: 'typeset<>::type' declared here
  typedef typeset type;
                  ^

Note that if I write ::typeset<X> (adding :: in front) it compiles.

Could be related to <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - too few template arguments for class template 'set'"
   href="show_bug.cgi?id=10147">bug 10147</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>