https://llvm.org/bugs/show_bug.cgi?id=27377
Bug ID: 27377
Summary: Clang cannot find base class overload when subclass is
disabled with enable_if
Product: clang
Version: 3.7
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
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);
}
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs