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 // Regression test for https://github.com/llvm/llvm-project/issues/101960 where we used to
12 // trigger an ambiguous constructor.
17 struct NastyConvertible
{
26 NastyConvertible nasty
;
27 std::complex<T
> x(nasty
, nasty
);
28 assert(x
.real() == T(0));
29 assert(x
.imag() == T(0));
32 int main(int, char**) {