Permalink
Browse files

Deprecate hpx::util::unwrapped

* Use hpx::util::unwrap and hpx::util::unwrapping instead,
  that clearify which underlying implementation should
  be used (the immediate or the deferred one).
  The automatic implementation selection was broken since
  unwrapped allowed to pass non future arguments through.
* Closes #1400
* Closes #1404
* Closes #2456
* Ref #1126
* Ref #1132
  • Loading branch information...
Naios committed Jul 24, 2017
1 parent 6a32d0c commit 5982cf22a1a06c12e2ba489820d275b827756cc0
Showing with 27 additions and 309 deletions.
  1. +8 −0 CMakeLists.txt
  2. +6 −0 docs/whats_new.qbk
  3. +13 −13 hpx/util/unwrapped.hpp
  4. +0 −1 tests/unit/util/CMakeLists.txt
  5. +0 −295 tests/unit/util/unwrapped.cpp
View
@@ -948,6 +948,14 @@ if(HPX_WITH_ALGORITHM_INPUT_ITERATOR_SUPPORT)
hpx_add_config_define(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
endif()
# HPX_WITH_UNWRAPPED_COMPATIBILITY: introduced in V1.1.0
hpx_option(HPX_WITH_UNWRAPPED_COMPATIBILITY BOOL
"Enable the deprecated unwrapped function (default: ON)"
ON ADVANCED)
if(HPX_WITH_UNWRAPPED_COMPATIBILITY)
hpx_add_config_define(HPX_HAVE_UNWRAPPED_COMPATIBILITY)
endif()
################################################################################
# Set basic search paths for HPX
################################################################################
View
@@ -55,6 +55,12 @@ particular order):
minimal Visual Studio version we now test on is Visual Studio 2015.5.
* We have dropped support for the Boost V1.51-V1.54. The minimal version of
Boost we now test is Boost V1.55.
* We have dropped support for the `hpx::util::unwrapped` API.
`hpx::util::unwrapped` will stay functional to some degree,
until it finally gets removed in a later version of HPX.
The functional usage of `hpx::util::unwrapped` should be
changed to the new `hpx::util::unwrapping` function whereas
the immediate usage should be replaced to `hpx::util::unwrap`.
[heading Bug Fixes (Closed Tickets)]
View
@@ -9,6 +9,11 @@
#define HPX_UTIL_UNWRAPPED_HPP
#include <hpx/config.hpp>
// hpx::util::unwrapped was deprecated in V1.1.0 and thus will be
// removed in a later version of HPX.
#if defined(HPX_HAVE_UNWRAPPED_COMPATIBILITY)
#include <hpx/traits/is_future.hpp>
#include <hpx/traits/is_future_range.hpp>
#include <hpx/traits/is_future_tuple.hpp>
@@ -127,12 +132,9 @@ namespace util {
/// as soon as we allowed to route non future types through.
///
template <typename... Args>
// This will be enabled once the old implementation is deprecated:
// #if !defined(HPX_NO_DEPRECATE_UNWRAPPED)
// HPX_DEPRECATED("hpx::util::unwrapped was replaced by "
// "hpx::util::unwrap and hpx::util::unwrapping "
// "and might be removed in a later version of HPX!")
// #endif // HPX_NO_DEPRECATE_UNWRAPPED
HPX_DEPRECATED("hpx::util::unwrapped was replaced by "
"hpx::util::unwrap and hpx::util::unwrapping "
"and might be removed in a later version of HPX!")
auto unwrapped(Args&&... args) -> decltype(detail::proxy_new_unwrapped<
detail::is_functional_unwrap<Args...>::value,
1U>::proxy(std::forward<Args>(args)...))
@@ -152,12 +154,9 @@ namespace util {
/// See hpx::util::unwrapped() for details.
///
template <typename... Args>
// This will be enabled once the old implementation is deprecated:
// #if !defined(HPX_NO_DEPRECATE_UNWRAPPED)
// HPX_DEPRECATED("hpx::util::unwrapped2 was replaced by "
// "hpx::util::unwrap_n<2> and hpx::util::unwrapping_n<2> "
// "and might be removed in a later version of HPX!")
// #endif // HPX_NO_DEPRECATE_UNWRAPPED
HPX_DEPRECATED("hpx::util::unwrapped2 was replaced by "
"hpx::util::unwrap_n<2> and hpx::util::unwrapping_n<2> "
"and might be removed in a later version of HPX!")
auto unwrapped2(Args&&... args) -> decltype(detail::proxy_new_unwrapped<
detail::is_functional_unwrap<Args...>::value,
2U>::proxy(std::forward<Args>(args)...))
@@ -169,4 +168,5 @@ namespace util {
} // end namespace util
} // end namespace hpx
#endif
#endif // HPX_HAVE_UNWRAPPED_COMPATIBILITY
#endif // HPX_UTIL_UNWRAPPED_HPP
@@ -16,7 +16,6 @@ set(tests
tagged
tuple
unwrap
unwrapped
)
if(HPX_WITH_CXX11_STD_INITIALIZER_LIST)

This file was deleted.

Oops, something went wrong.

0 comments on commit 5982cf2

Please sign in to comment.