mirror of git://gcc.gnu.org/git/gcc.git
tuple (__conv_types, [...]): Remove.
2011-11-21 Paolo Carlini <paolo.carlini@oracle.com> * include/std/tuple (__conv_types, __one_by_one_convertible, __all_convertible): Remove. (tuple<>::tuple(_UElements&&...), tuple<>::tuple(const tuple<_UElements...>&), tuple<>::tuple(tuple<_UElements...>&&)): Remove wa for c++/48322. From-SVN: r181555
This commit is contained in:
parent
5436efaa0f
commit
a7cd7b6088
|
@ -1,3 +1,11 @@
|
||||||
|
2011-11-21 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
|
* include/std/tuple (__conv_types, __one_by_one_convertible,
|
||||||
|
__all_convertible): Remove.
|
||||||
|
(tuple<>::tuple(_UElements&&...),
|
||||||
|
tuple<>::tuple(const tuple<_UElements...>&),
|
||||||
|
tuple<>::tuple(tuple<_UElements...>&&)): Remove wa for c++/48322.
|
||||||
|
|
||||||
2011-11-20 Jason Merrill <jason@redhat.com>
|
2011-11-20 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
PR c++/48322
|
PR c++/48322
|
||||||
|
|
|
@ -69,35 +69,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
struct __add_r_ref<_Tp&>
|
struct __add_r_ref<_Tp&>
|
||||||
{ typedef _Tp& type; };
|
{ typedef _Tp& type; };
|
||||||
|
|
||||||
// To work around c++/49225 aka c++/48322.
|
|
||||||
template<typename...>
|
|
||||||
struct __conv_types { };
|
|
||||||
|
|
||||||
template<typename _Tuple1, typename _Tuple2>
|
|
||||||
struct __one_by_one_convertible
|
|
||||||
: public false_type { };
|
|
||||||
|
|
||||||
template<typename _Tp, typename _Up>
|
|
||||||
struct __one_by_one_convertible<__conv_types<_Tp>, __conv_types<_Up>>
|
|
||||||
: public is_convertible<_Tp, _Up>::type { };
|
|
||||||
|
|
||||||
template<typename _T1, typename... _TR, typename _U1, typename... _UR>
|
|
||||||
struct __one_by_one_convertible<__conv_types<_T1, _TR...>,
|
|
||||||
__conv_types<_U1, _UR...>>
|
|
||||||
: public __and_<is_convertible<_T1, _U1>,
|
|
||||||
__one_by_one_convertible<__conv_types<_TR...>,
|
|
||||||
__conv_types<_UR...>>>::type
|
|
||||||
{ };
|
|
||||||
|
|
||||||
template<typename _Tuple1, typename _Tuple2>
|
|
||||||
struct __all_convertible;
|
|
||||||
|
|
||||||
template<typename... _TTypes, typename... _UTypes>
|
|
||||||
struct __all_convertible<__conv_types<_TTypes...>,
|
|
||||||
__conv_types<_UTypes...>>
|
|
||||||
: public __one_by_one_convertible<__conv_types<_TTypes...>,
|
|
||||||
__conv_types<_UTypes...>>::type { };
|
|
||||||
|
|
||||||
template<std::size_t _Idx, typename _Head, bool _IsEmpty>
|
template<std::size_t _Idx, typename _Head, bool _IsEmpty>
|
||||||
struct _Head_base;
|
struct _Head_base;
|
||||||
|
|
||||||
|
@ -407,13 +378,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
constexpr tuple(const _Elements&... __elements)
|
constexpr tuple(const _Elements&... __elements)
|
||||||
: _Inherited(__elements...) { }
|
: _Inherited(__elements...) { }
|
||||||
|
|
||||||
template<typename... _UElements,
|
template<typename... _UElements, typename = typename
|
||||||
typename = typename enable_if<sizeof...(_UElements)
|
enable_if<__and_<is_convertible<_UElements,
|
||||||
== sizeof...(_Elements)>::type,
|
_Elements>...>::value>::type>
|
||||||
typename = typename
|
|
||||||
enable_if<__all_convertible<__conv_types<_UElements...>,
|
|
||||||
__conv_types<_Elements...> >::value
|
|
||||||
>::type>
|
|
||||||
explicit
|
explicit
|
||||||
constexpr tuple(_UElements&&... __elements)
|
constexpr tuple(_UElements&&... __elements)
|
||||||
: _Inherited(std::forward<_UElements>(__elements)...) { }
|
: _Inherited(std::forward<_UElements>(__elements)...) { }
|
||||||
|
@ -423,21 +390,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
constexpr tuple(tuple&&) = default;
|
constexpr tuple(tuple&&) = default;
|
||||||
|
|
||||||
template<typename... _UElements, typename = typename
|
template<typename... _UElements, typename = typename
|
||||||
enable_if<__and_<integral_constant<bool, sizeof...(_UElements)
|
enable_if<__and_<is_convertible<const _UElements&,
|
||||||
== sizeof...(_Elements)>,
|
_Elements>...>::value>::type>
|
||||||
__all_convertible<__conv_types<const _UElements&...>,
|
|
||||||
__conv_types<_Elements...>>
|
|
||||||
>::value>::type>
|
|
||||||
constexpr tuple(const tuple<_UElements...>& __in)
|
constexpr tuple(const tuple<_UElements...>& __in)
|
||||||
: _Inherited(static_cast<const _Tuple_impl<0, _UElements...>&>(__in))
|
: _Inherited(static_cast<const _Tuple_impl<0, _UElements...>&>(__in))
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
template<typename... _UElements, typename = typename
|
template<typename... _UElements, typename = typename
|
||||||
enable_if<__and_<integral_constant<bool, sizeof...(_UElements)
|
enable_if<__and_<is_convertible<_UElements,
|
||||||
== sizeof...(_Elements)>,
|
_Elements>...>::value>::type>
|
||||||
__all_convertible<__conv_types<_UElements...>,
|
|
||||||
__conv_types<_Elements...>>
|
|
||||||
>::value>::type>
|
|
||||||
constexpr tuple(tuple<_UElements...>&& __in)
|
constexpr tuple(tuple<_UElements...>&& __in)
|
||||||
: _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { }
|
: _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { }
|
||||||
|
|
||||||
|
|
|
@ -44,4 +44,4 @@ void test01()
|
||||||
|
|
||||||
tuple<Type> t(allocator_arg, a, 1);
|
tuple<Type> t(allocator_arg, a, 1);
|
||||||
}
|
}
|
||||||
// { dg-error "no matching function" "" { target *-*-* } 141 }
|
// { dg-error "no matching function" "" { target *-*-* } 112 }
|
||||||
|
|
Loading…
Reference in New Issue