@@ -1550,6 +1550,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
tuple(allocator_arg_t __tag, const _Alloc& __a)
: _Inherited(__tag, __a) { }
+ template<typename _Alloc,
+ _ExplicitDefaultCtor<is_object<_Alloc>::value> = false>
+ _GLIBCXX20_CONSTEXPR
+ explicit
+ tuple(allocator_arg_t __tag, const _Alloc& __a)
+ : _Inherited(__tag, __a) { }
+
template<typename _Alloc, bool _NotEmpty = (sizeof...(_Elements) >= 1),
_ImplicitCtor<_NotEmpty, const _Elements&...> = true>
_GLIBCXX20_CONSTEXPR
@@ -2198,6 +2205,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
tuple(allocator_arg_t __tag, const _Alloc& __a)
: _Inherited(__tag, __a) { }
+ template<typename _Alloc,
+ _ExplicitDefaultCtor<is_object<_Alloc>::value, _T1, _T2> = false>
+ _GLIBCXX20_CONSTEXPR
+ explicit
+ tuple(allocator_arg_t __tag, const _Alloc& __a)
+ : _Inherited(__tag, __a) { }
+
template<typename _Alloc, bool _Dummy = true,
_ImplicitCtor<_Dummy, const _T1&, const _T2&> = true>
_GLIBCXX20_CONSTEXPR
new file mode 100644
@@ -0,0 +1,15 @@
+// { dg-do compile { target c++11 } }
+
+// PR libstdc++/114147
+// tuple allocator-extended ctor requires non-explicit default ctor
+
+#include <tuple>
+#include <memory>
+
+struct X { explicit X(); };
+
+std::allocator<int> a;
+std::tuple<X> t0(std::allocator_arg, a);
+std::tuple<int, X> t1(std::allocator_arg, a);
+std::tuple<X, int> t2(std::allocator_arg, a);
+std::tuple<int, X, int> t3(std::allocator_arg, a);