//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // UNSUPPORTED: c++98, c++03 // Before GCC 6, aggregate initialization kicks in. // See https://stackoverflow.com/q/41799015/627587. // UNSUPPORTED: gcc-5 // // template class tuple; // explicit(see-below) constexpr tuple(); #include struct Implicit { Implicit() = default; }; struct Explicit { explicit Explicit() = default; }; std::tuple<> test1() { return {}; } std::tuple test2() { return {}; } std::tuple test3() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} std::tuple test4() { return {}; } std::tuple test5() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} std::tuple test6() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} std::tuple test7() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} std::tuple test8() { return {}; } std::tuple test9() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} std::tuple test10() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} std::tuple test11() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} std::tuple test12() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} std::tuple test13() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} std::tuple test14() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} std::tuple test15() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} int main(int, char**) { return 0; }