19795699aSEric Fiselier //===----------------------------------------------------------------------===//
29795699aSEric Fiselier //
357b08b09SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
457b08b09SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
557b08b09SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
69795699aSEric Fiselier //
79795699aSEric Fiselier //===----------------------------------------------------------------------===//
89795699aSEric Fiselier
99795699aSEric Fiselier // <tuple>
109795699aSEric Fiselier
119795699aSEric Fiselier // template <class... Types> class tuple;
129795699aSEric Fiselier
139795699aSEric Fiselier // template <class Alloc, class ...UTypes>
149795699aSEric Fiselier // tuple(allocator_arg_t, const Alloc& a, tuple<UTypes...> const&);
159795699aSEric Fiselier
16*31cbe0f2SLouis Dionne // UNSUPPORTED: c++03
179795699aSEric Fiselier
189795699aSEric Fiselier #include <tuple>
199795699aSEric Fiselier #include <memory>
209795699aSEric Fiselier
219795699aSEric Fiselier struct ExplicitCopy {
ExplicitCopyExplicitCopy229795699aSEric Fiselier explicit ExplicitCopy(int) {}
ExplicitCopyExplicitCopy239795699aSEric Fiselier explicit ExplicitCopy(ExplicitCopy const&) {}
249795699aSEric Fiselier
259795699aSEric Fiselier };
269795699aSEric Fiselier
const_explicit_copy_test()279795699aSEric Fiselier std::tuple<ExplicitCopy> const_explicit_copy_test() {
289795699aSEric Fiselier const std::tuple<int> t1(42);
295b1e5b43SMichael Park return {std::allocator_arg, std::allocator<int>{}, t1};
309795699aSEric Fiselier // expected-error@-1 {{chosen constructor is explicit in copy-initialization}}
319795699aSEric Fiselier }
329795699aSEric Fiselier
non_const_explicit_copy_test()339795699aSEric Fiselier std::tuple<ExplicitCopy> non_const_explicit_copy_test() {
349795699aSEric Fiselier std::tuple<int> t1(42);
355b1e5b43SMichael Park return {std::allocator_arg, std::allocator<int>{}, t1};
369795699aSEric Fiselier // expected-error@-1 {{chosen constructor is explicit in copy-initialization}}
379795699aSEric Fiselier }
389795699aSEric Fiselier
main(int,char **)392df59c50SJF Bastien int main(int, char**)
409795699aSEric Fiselier {
419795699aSEric Fiselier
422df59c50SJF Bastien
432df59c50SJF Bastien return 0;
449795699aSEric Fiselier }
45