f4a2713ac8
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
28 lines
561 B
C++
28 lines
561 B
C++
// RUN: %clang_cc1 -std=c++11 %s -verify
|
|
|
|
// expected-no-diagnostics
|
|
|
|
namespace PR15757 {
|
|
struct S {
|
|
};
|
|
|
|
template<typename X, typename Y> struct T {
|
|
template<typename A> T(X x, A &&a) {}
|
|
|
|
template<typename A> explicit T(A &&a)
|
|
noexcept(noexcept(T(X(), static_cast<A &&>(a))))
|
|
: T(X(), static_cast<A &&>(a)) {}
|
|
};
|
|
|
|
template<typename X, typename Y> struct U : T<X, Y> {
|
|
using T<X, Y>::T;
|
|
};
|
|
|
|
U<S, char> foo(char ch) { return U<S, char>(ch); }
|
|
|
|
int main() {
|
|
U<S, int> a(42);
|
|
U<S, char> b('4');
|
|
return 0;
|
|
}
|
|
}
|