@@ -457,6 +457,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
};
+ template<typename... _Elements>
+ class tuple;
// Concept utility functions, reused in conditionally-explicit
// constructors.
@@ -490,7 +492,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _SrcTuple>
static constexpr bool _NonNestedTuple()
{
- return __and_<__not_<is_convertible<_SrcTuple, _Elements...>>,
+ return __and_<__not_<is_same<tuple<_Elements...>,
+ typename remove_cv<
+ typename remove_reference<_SrcTuple>::type
+ >::type>>,
+ __not_<is_convertible<_SrcTuple, _Elements...>>,
__not_<is_constructible<_Elements..., _SrcTuple>>
>::value;
}
new file mode 100644
@@ -0,0 +1,24 @@
+// { dg-do compile }
+
+#include <tuple>
+
+struct A
+{
+ template <typename T>
+ A(T)
+ {
+ }
+
+ A(const A&) = default;
+ A(A&&) = default;
+ A& operator=(const A&) = default;
+ A& operator=(A&&) = default;
+ ~A() = default;
+};
+
+int main()
+{
+ auto x = A{7};
+ std::make_tuple(x);
+}
+