<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 --- - Deduced template parameter after defaulted template parameter not working for static class member"
   href="http://llvm.org/bugs/show_bug.cgi?id=16288">16288</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Deduced template parameter after defaulted template parameter not working for static class member
          </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>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>vince.rev@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>Consider the following example :

----------------------------------------
#include <iostream>
#include <tuple>

template <class Type>
struct Getter
{
    template <unsigned int Index = 0, class Tuple>
    static inline Type get(const Tuple& tuple);
};

template <class Type>
template <unsigned int Index, class Tuple>
inline Type Getter<Type>::get(const Tuple& tuple)
{
    return std::get<Index>(tuple);
}

int main(int argc, char* argv[])
{
    std::cout<<Getter<int>::get(std::make_tuple(42))<<std::endl;
    return 0;
}
----------------------------------------

Under "clang++ 3.2-1~exp9ubuntu1", it produces the following error :
----------------------------------------
defaulttemplate.cpp:12:37: error: template parameter missing a default argument
template <unsigned int Index, class Tuple>
                                    ^
defaulttemplate.cpp:7:36: note: previous default template argument defined here
    template <unsigned int Index = 0, class Tuple>
----------------------------------------

If the member is defined inside the class declaration, clang++ does not
complain anymore.</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>