std::pair<int, int> f1() {return {1,2};}
-std::pair<Explicit, Explicit> f2() {return {1,2};} // { dg-error "could not convert" }
+std::pair<Explicit, Explicit> f2() {return {1,2};} // { dg-error "explicit constructor" }
std::pair<long, long> f3() {return std::pair<int, int>{1,2};}
std::pair<Explicit, Explicit> v1{1,2};
-std::pair<Explicit, Explicit> v2 = {1,2}; // { dg-error "could not convert" }
+std::pair<Explicit, Explicit> v2 = {1,2}; // { dg-error "explicit constructor" }
std::pair<Explicit, Explicit> v3{std::pair<int,int>{1,2}};
{
f6(v0); // { dg-error "could not convert" }
f6(v1);
- f6({1,2}); // { dg-error "could not convert" }
+ f6({1,2}); // { dg-error "explicit constructor" }
f6(std::pair<Explicit, Explicit>{});
f6(std::pair<int, int>{}); // { dg-error "could not convert" }
f7(v0);
std::pair<ExplicitMoveOnly, int*> v15{MoveOnly{}, nullptr};
std::pair<int*, ExplicitMoveOnly> v16 =
- {nullptr, MoveOnly{}}; // { dg-error "could not convert" }
+ {nullptr, MoveOnly{}}; // { dg-error "explicit constructor" }
std::pair<ExplicitMoveOnly, int*> v17 =
- {MoveOnly{}, nullptr}; // { dg-error "could not convert" }
+ {MoveOnly{}, nullptr}; // { dg-error "explicit constructor" }
std::tuple<int, int, int> f1c() {return {1,2,3};}
std::tuple<Explicit> f2_a()
-{return {1};} // { dg-error "could not convert" }
+{return {1};} // { dg-error "explicit constructor" }
std::tuple<Explicit, Explicit> f2_b()
-{return {1,2};} // { dg-error "could not convert" }
+{return {1,2};} // { dg-error "explicit constructor" }
std::tuple<Explicit, Explicit, Explicit> f2_c()
-{return {1,2,3};} // { dg-error "could not convert" }
+{return {1,2,3};} // { dg-error "explicit constructor" }
std::tuple<long> f3_a() {return std::tuple<int>{1};}
std::tuple<long, long> f3_b() {return std::tuple<int, int>{1,2};}
std::tuple<long, long, long> f5_c() {return {1,2,3};}
std::tuple<ExplicitDefault> f6_a()
-{return {};} // { dg-error "could not convert" }
+{return {};} // { dg-error "explicit constructor" }
std::tuple<ExplicitDefault, ExplicitDefault> f6_b()
-{return {};} // { dg-error "could not convert" }
+{return {};} // { dg-error "explicit constructor" }
std::tuple<ExplicitDefault, ExplicitDefault, ExplicitDefault> f6_c()
-{return {};} // { dg-error "could not convert" }
+{return {};} // { dg-error "explicit constructor" }
std::tuple<ExplicitDefault, int> f6_d()
-{return {};} // { dg-error "could not convert" }
+{return {};} // { dg-error "explicit constructor" }
std::tuple<ExplicitDefaultDefault> f7_a()
-{return {};} // { dg-error "could not convert" }
+{return {};} // { dg-error "explicit constructor" }
std::tuple<ExplicitDefaultDefault, ExplicitDefaultDefault> f7_b()
-{return {};} // { dg-error "could not convert" }
+{return {};} // { dg-error "explicit constructor" }
std::tuple<ExplicitDefaultDefault,
ExplicitDefaultDefault,
ExplicitDefaultDefault> f7_c()
-{return {};} // { dg-error "could not convert" }
+{return {};} // { dg-error "explicit constructor" }
std::tuple<int, int> fp1() {return std::pair<int, int>{1,2}; }
std::tuple<long, long> fp2() {return std::pair<int, int>{1,2}; }
std::tuple<Explicit, Explicit> v1_b{1,2};
std::tuple<Explicit, Explicit, Explicit> v1_c{1,2,3};
-std::tuple<Explicit> v2_a = {1}; // { dg-error "could not convert" }
-std::tuple<Explicit, Explicit> v2_b = {1,2}; // { dg-error "could not convert" }
-std::tuple<Explicit, Explicit, Explicit> v2_c = {1,2,3}; // { dg-error "could not convert" }
+std::tuple<Explicit> v2_a = {1}; // { dg-error "explicit constructor" }
+std::tuple<Explicit, Explicit> v2_b = {1,2}; // { dg-error "explicit constructor" }
+std::tuple<Explicit, Explicit, Explicit> v2_c = {1,2,3}; // { dg-error "explicit constructor" }
std::tuple<Explicit> v3_a{std::tuple<int>{1}};
std::tuple<Explicit, Explicit> v3_b{std::tuple<int,int>{1,2}};
v31_c{std::allocator_arg, std::allocator<int>{}, 1,2,3};
std::tuple<Explicit> v32_a
- = {std::allocator_arg, std::allocator<int>{ }, 1}; // { dg-error "could not convert" }
+ = {std::allocator_arg, std::allocator<int>{ }, 1}; // { dg-error "explicit constructor" }
std::tuple<Explicit, Explicit> v32_b
- = {std::allocator_arg, std::allocator<int>{}, 1, 2}; // { dg-error "could not convert" }
+ = {std::allocator_arg, std::allocator<int>{}, 1, 2}; // { dg-error "explicit constructor" }
std::tuple<Explicit, Explicit, Explicit> v32_c
- = {std::allocator_arg, std::allocator<int>{}, 1,2,3}; // { dg-error "could not convert" }
+ = {std::allocator_arg, std::allocator<int>{}, 1,2,3}; // { dg-error "explicit constructor" }
std::tuple<int, int> v33{std::allocator_arg, std::allocator<int>{},
std::pair<int, int>{1, 2}};
std::pair<int, int>{1, 2}};
std::tuple<Explicit, Explicit> v38
-= {std::allocator_arg, std::allocator<int>{}, std::pair<int, int>{1, 2}}; // { dg-error "could not convert" }
+= {std::allocator_arg, std::allocator<int>{}, std::pair<int, int>{1, 2}}; // { dg-error "explicit constructor" }
std::tuple<int, int> v39{std::allocator_arg, std::allocator<int>{}, v20};
std::tuple<long, long> v43 = {std::allocator_arg, std::allocator<int>{}, v20};
std::tuple<Explicit, Explicit> v44
-= {std::allocator_arg, std::allocator<int>{ }, v20}; // { dg-error "could not convert" }
+= {std::allocator_arg, std::allocator<int>{ }, v20}; // { dg-error "explicit constructor" }
std::tuple<ExplicitDefault> v45_a{};
std::tuple<ExplicitDefault, int> v45_b{};
-std::tuple<ExplicitDefault> v46_a = {}; // { dg-error "could not convert" }
-std::tuple<ExplicitDefault, int> v46_b = {}; // { dg-error "could not convert" }
+std::tuple<ExplicitDefault> v46_a = {}; // { dg-error "explicit constructor" }
+std::tuple<ExplicitDefault, int> v46_b = {}; // { dg-error "explicit constructor" }
std::tuple<ExplicitDefaultDefault> v47_a{};
std::tuple<ExplicitDefaultDefault, int> v47_b{};
-std::tuple<ExplicitDefaultDefault> v48_a = {}; // { dg-error "could not convert" }
-std::tuple<ExplicitDefaultDefault, int> v48_b = { }; // { dg-error "could not convert" }
+std::tuple<ExplicitDefaultDefault> v48_a = {}; // { dg-error "explicit constructor" }
+std::tuple<ExplicitDefaultDefault, int> v48_b = { }; // { dg-error "explicit constructor" }
struct DeletedCopy
f8_b(v1_b);
f8_c(v1_c);
- f8_a({1}); // { dg-error "could not convert" }
- f8_b({1,2}); // { dg-error "could not convert" }
- f8_c({1,2,3}); // { dg-error "could not convert" }
+ f8_a({1}); // { dg-error "explicit constructor" }
+ f8_b({1,2}); // { dg-error "explicit constructor" }
+ f8_c({1,2,3}); // { dg-error "explicit constructor" }
f8_a(std::tuple<Explicit>{});
f8_b(std::tuple<Explicit, Explicit>{});
f9_b(std::tuple<long, long>{});
f9_c(std::tuple<long, long, long>{});
- f10_a({}); // { dg-error "could not convert" }
- f10_b({}); // { dg-error "could not convert" }
- f11_a({}); // { dg-error "could not convert" }
- f11_b({}); // { dg-error "could not convert" }
+ f10_a({}); // { dg-error "explicit constructor" }
+ f10_b({}); // { dg-error "explicit constructor" }
+ f11_a({}); // { dg-error "explicit constructor" }
+ f11_b({}); // { dg-error "explicit constructor" }
f10_a(std::tuple<ExplicitDefault>{});
f10_b(std::tuple<ExplicitDefault, int>{});