1 //===----------------------------------------------------------------------===// 2 // 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 6 // 7 //===----------------------------------------------------------------------===// 8 9 // UNSUPPORTED: c++98, c++03 10 11 // <tuple> 12 13 // template <class... Types> class tuple; 14 15 // template <class Alloc> 16 // explicit(see-below) tuple(allocator_arg_t, const Alloc& a); 17 18 // Make sure we get the explicit-ness of the constructor right. 19 // This is LWG 3158. 20 21 #include <tuple> 22 #include <memory> 23 24 25 struct ExplicitDefault { explicit ExplicitDefault() { } }; 26 27 std::tuple<ExplicitDefault> explicit_default_test() { 28 return {std::allocator_arg, std::allocator<int>()}; // expected-error {{chosen constructor is explicit in copy-initialization}} 29 } 30 31 int main(int, char**) { 32 return 0; 33 } 34