[libcxx] r235274 - Remove constexpr support for std::apply because it introduces regressions.
Eric Fiselier
eric at efcs.ca
Sun Apr 19 08:32:54 PDT 2015
Author: ericwf
Date: Sun Apr 19 10:32:52 2015
New Revision: 235274
URL: http://llvm.org/viewvc/llvm-project?rev=235274&view=rev
Log:
Remove constexpr support for std::apply because it introduces regressions.
Modified:
libcxx/trunk/include/__functional_base
libcxx/trunk/include/experimental/tuple
libcxx/trunk/include/type_traits
libcxx/trunk/test/std/experimental/utilities/tuple/tuple.apply/constexpr_types.pass.cpp
libcxx/trunk/test/std/experimental/utilities/tuple/tuple.apply/ref_qualifiers.pass.cpp
Modified: libcxx/trunk/include/__functional_base
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__functional_base?rev=235274&r1=235273&r2=235274&view=diff
==============================================================================
--- libcxx/trunk/include/__functional_base (original)
+++ libcxx/trunk/include/__functional_base Sun Apr 19 10:32:52 2015
@@ -364,7 +364,7 @@ struct __weak_result_type<_Rp (_Cp::*)(_
template <class _Fp, class _A0, class ..._Args,
class>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY
auto
__invoke(_Fp&& __f, _A0&& __a0, _Args&& ...__args)
-> decltype((_VSTD::forward<_A0>(__a0).*__f)(_VSTD::forward<_Args>(__args)...))
@@ -374,7 +374,7 @@ __invoke(_Fp&& __f, _A0&& __a0, _Args&&
template <class _Fp, class _A0, class ..._Args,
class>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY
auto
__invoke(_Fp&& __f, _A0&& __a0, _Args&& ...__args)
-> decltype(((*_VSTD::forward<_A0>(__a0)).*__f)(_VSTD::forward<_Args>(__args)...))
@@ -386,7 +386,7 @@ __invoke(_Fp&& __f, _A0&& __a0, _Args&&
template <class _Fp, class _A0,
class>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY
auto
__invoke(_Fp&& __f, _A0&& __a0)
-> decltype(_VSTD::forward<_A0>(__a0).*__f)
@@ -396,7 +396,7 @@ __invoke(_Fp&& __f, _A0&& __a0)
template <class _Fp, class _A0,
class>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY
auto
__invoke(_Fp&& __f, _A0&& __a0)
-> decltype((*_VSTD::forward<_A0>(__a0)).*__f)
@@ -407,7 +407,7 @@ __invoke(_Fp&& __f, _A0&& __a0)
// bullet 5
template <class _Fp, class ..._Args>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY
auto
__invoke(_Fp&& __f, _Args&& ...__args)
-> decltype(_VSTD::forward<_Fp>(__f)(_VSTD::forward<_Args>(__args)...))
Modified: libcxx/trunk/include/experimental/tuple
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/experimental/tuple?rev=235274&r1=235273&r2=235274&view=diff
==============================================================================
--- libcxx/trunk/include/experimental/tuple (original)
+++ libcxx/trunk/include/experimental/tuple Sun Apr 19 10:32:52 2015
@@ -56,7 +56,7 @@ _LIBCPP_CONSTEXPR size_t tuple_size_v =
#endif
template <class _Fn, class _Tuple, size_t ..._Id>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY
decltype(auto) __apply_tuple_impl(_Fn && __f, _Tuple && __t,
integer_sequence<size_t, _Id...>) {
return _VSTD::__invoke(
Modified: libcxx/trunk/include/type_traits
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/type_traits?rev=235274&r1=235273&r2=235274&view=diff
==============================================================================
--- libcxx/trunk/include/type_traits (original)
+++ libcxx/trunk/include/type_traits Sun Apr 19 10:32:52 2015
@@ -3448,7 +3448,7 @@ template <class _Fp, class _A0, class ..
typename remove_reference<_A0>::type>::value
>::type
>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY
auto
__invoke(_Fp&& __f, _A0&& __a0, _Args&& ...__args)
-> decltype((_VSTD::forward<_A0>(__a0).*__f)(_VSTD::forward<_Args>(__args)...));
@@ -3461,7 +3461,7 @@ template <class _Fp, class _A0, class ..
typename remove_reference<_A0>::type>::value
>::type
>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY
auto
__invoke(_Fp&& __f, _A0&& __a0, _Args&& ...__args)
-> decltype(((*_VSTD::forward<_A0>(__a0)).*__f)(_VSTD::forward<_Args>(__args)...));
@@ -3476,7 +3476,7 @@ template <class _Fp, class _A0,
typename remove_reference<_A0>::type>::value
>::type
>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY
auto
__invoke(_Fp&& __f, _A0&& __a0)
-> decltype(_VSTD::forward<_A0>(__a0).*__f);
@@ -3489,7 +3489,7 @@ template <class _Fp, class _A0,
typename remove_reference<_A0>::type>::value
>::type
>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY
auto
__invoke(_Fp&& __f, _A0&& __a0)
-> decltype((*_VSTD::forward<_A0>(__a0)).*__f);
@@ -3497,7 +3497,7 @@ __invoke(_Fp&& __f, _A0&& __a0)
// bullet 5
template <class _Fp, class ..._Args>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY
auto
__invoke(_Fp&& __f, _Args&& ...__args)
-> decltype(_VSTD::forward<_Fp>(__f)(_VSTD::forward<_Args>(__args)...));
Modified: libcxx/trunk/test/std/experimental/utilities/tuple/tuple.apply/constexpr_types.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/utilities/tuple/tuple.apply/constexpr_types.pass.cpp?rev=235274&r1=235273&r2=235274&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/utilities/tuple/tuple.apply/constexpr_types.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/utilities/tuple/tuple.apply/constexpr_types.pass.cpp Sun Apr 19 10:32:52 2015
@@ -9,6 +9,11 @@
// UNSUPPORTED: c++98, c++03, c++11
+// TODO(ericwf)
+// constexpr support temporarily reverted due to bug:
+// https://llvm.org/bugs/show_bug.cgi?id=23141
+// XFAIL: *
+
// <experimental/tuple>
// template <class F, class T> constexpr decltype(auto) apply(F &&, T &&)
Modified: libcxx/trunk/test/std/experimental/utilities/tuple/tuple.apply/ref_qualifiers.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/utilities/tuple/tuple.apply/ref_qualifiers.pass.cpp?rev=235274&r1=235273&r2=235274&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/utilities/tuple/tuple.apply/ref_qualifiers.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/utilities/tuple/tuple.apply/ref_qualifiers.pass.cpp Sun Apr 19 10:32:52 2015
@@ -32,6 +32,8 @@ namespace ex = std::experimental;
int main()
{
+// TODO(ericwf): Re-enable constexpr support
+/*
{
constexpr func_obj f;
constexpr std::tuple<> tp;
@@ -39,6 +41,7 @@ int main()
static_assert(1 == ex::apply(static_cast<func_obj const &>(f), tp), "");
static_assert(2 == ex::apply(static_cast<func_obj const &&>(f), tp), "");
}
+*/
{
func_obj f;
std::tuple<> tp;
More information about the cfe-commits
mailing list