<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 --- - Clang cannot find base class overload when subclass is disabled with enable_if"
   href="https://llvm.org/bugs/show_bug.cgi?id=27377">27377</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang cannot find base class overload when subclass is disabled with enable_if
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.7
          </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>rhainin1@binghamton.edu
          </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>The call to s.f below should call Base::f, instead it errors with:

 error: no matching member function for call to 'f'
  s.f(1);
  ~~^
llvm/llvm/bin/../include/c++/v1/type_traits:244:78: note: candidate template
ignored:
      disabled by 'enable_if' [with U = int]
template <bool _Bp, class _Tp = void> using enable_if_t = typename
enable_if<_Bp, _Tp>::type;


// example

struct Base {
  template <typename U>
  void f(U) { }
};

struct Sub : Base {
  using Base::f;
  template <typename U, typename =std::enable_if_t<!std::is_same<int, U>{}>>
  void f(U) { }
};

int main() {
  Sub s{};
  s.f(1);
}</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>