1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 // Test that UDT's convertible to an integral or floating point type do not
13 // participate in overload resolution.
16 #include <type_traits>
21 operator IntT() const { return 1; }
28 UDT<unsigned long> uit;
33 std::real(ft); // expected-error {{no matching function}}
34 std::real(dt); // expected-error {{no matching function}}
35 std::real(ldt); // expected-error {{no matching function}}
36 std::real(it); // expected-error {{no matching function}}
37 std::real(uit); // expected-error {{no matching function}}
40 std::imag(ft); // expected-error {{no matching function}}
41 std::imag(dt); // expected-error {{no matching function}}
42 std::imag(ldt); // expected-error {{no matching function}}
43 std::imag(it); // expected-error {{no matching function}}
44 std::imag(uit); // expected-error {{no matching function}}
47 std::arg(ft); // expected-error {{no matching function}}
48 std::arg(dt); // expected-error {{no matching function}}
49 std::arg(ldt); // expected-error {{no matching function}}
50 std::arg(it); // expected-error {{no matching function}}
51 std::arg(uit); // expected-error {{no matching function}}
54 std::norm(ft); // expected-error {{no matching function}}
55 std::norm(dt); // expected-error {{no matching function}}
56 std::norm(ldt); // expected-error {{no matching function}}
57 std::norm(it); // expected-error {{no matching function}}
58 std::norm(uit); // expected-error {{no matching function}}
61 std::conj(ft); // expected-error {{no matching function}}
62 std::conj(dt); // expected-error {{no matching function}}
63 std::conj(ldt); // expected-error {{no matching function}}
64 std::conj(it); // expected-error {{no matching function}}
65 std::conj(uit); // expected-error {{no matching function}}
68 std::proj(ft); // expected-error {{no matching function}}
69 std::proj(dt); // expected-error {{no matching function}}
70 std::proj(ldt); // expected-error {{no matching function}}
71 std::proj(it); // expected-error {{no matching function}}
72 std::proj(uit); // expected-error {{no matching function}}