1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 // Test that UDT's convertible to an integral or floating point type do not
12 // participate in overload resolution.
15 #include <type_traits>
20 operator IntT() const { return 1; }
27 UDT
<unsigned long> uit
;
32 std::real(ft
); // expected-error {{no matching function}}
33 std::real(dt
); // expected-error {{no matching function}}
34 std::real(ldt
); // expected-error {{no matching function}}
35 std::real(it
); // expected-error {{no matching function}}
36 std::real(uit
); // expected-error {{no matching function}}
39 std::imag(ft
); // expected-error {{no matching function}}
40 std::imag(dt
); // expected-error {{no matching function}}
41 std::imag(ldt
); // expected-error {{no matching function}}
42 std::imag(it
); // expected-error {{no matching function}}
43 std::imag(uit
); // expected-error {{no matching function}}
46 std::arg(ft
); // expected-error {{no matching function}}
47 std::arg(dt
); // expected-error {{no matching function}}
48 std::arg(ldt
); // expected-error {{no matching function}}
49 std::arg(it
); // expected-error {{no matching function}}
50 std::arg(uit
); // expected-error {{no matching function}}
53 std::norm(ft
); // expected-error {{no matching function}}
54 std::norm(dt
); // expected-error {{no matching function}}
55 std::norm(ldt
); // expected-error {{no matching function}}
56 std::norm(it
); // expected-error {{no matching function}}
57 std::norm(uit
); // expected-error {{no matching function}}
60 std::conj(ft
); // expected-error {{no matching function}}
61 std::conj(dt
); // expected-error {{no matching function}}
62 std::conj(ldt
); // expected-error {{no matching function}}
63 std::conj(it
); // expected-error {{no matching function}}
64 std::conj(uit
); // expected-error {{no matching function}}
67 std::proj(ft
); // expected-error {{no matching function}}
68 std::proj(dt
); // expected-error {{no matching function}}
69 std::proj(ldt
); // expected-error {{no matching function}}
70 std::proj(it
); // expected-error {{no matching function}}
71 std::proj(uit
); // expected-error {{no matching function}}