diff --git a/cmake/HPX_PerformCxxFeatureTests.cmake b/cmake/HPX_PerformCxxFeatureTests.cmake index df420e86b63c..7f31429de163 100644 --- a/cmake/HPX_PerformCxxFeatureTests.cmake +++ b/cmake/HPX_PerformCxxFeatureTests.cmake @@ -180,12 +180,6 @@ macro(hpx_perform_cxx_feature_tests) DEFINITIONS HPX_HAVE_CXX14_DEPRECATED_ATTRIBUTE) hpx_check_for_cxx14_return_type_deduction() - - # check for experimental facilities - - # check for Library Fundamentals TS v2's experimental/optional - hpx_check_for_libfun_std_experimental_optional( - DEFINITIONS HPX_HAVE_LIBFUN_STD_EXPERIMENTAL_OPTIONAL) endif() if(HPX_WITH_CXX1Z OR HPX_WITH_CXX17) diff --git a/cmake/tests/libfun_std_experimental_optional.cpp b/cmake/tests/libfun_std_experimental_optional.cpp deleted file mode 100644 index b9fcde2f5625..000000000000 --- a/cmake/tests/libfun_std_experimental_optional.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2016 Hartmut Kaiser -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#include - -int main() -{ - std::experimental::optional opt; -} diff --git a/hpx/parallel/executors/execution.hpp b/hpx/parallel/executors/execution.hpp index 49a24e9327bb..94c334d4d1ae 100644 --- a/hpx/parallel/executors/execution.hpp +++ b/hpx/parallel/executors/execution.hpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -38,12 +39,6 @@ #include #include -#if defined(HPX_HAVE_CXX1Y_EXPERIMENTAL_OPTIONAL) -#include -#else -#include -#endif - /////////////////////////////////////////////////////////////////////////////// namespace hpx { namespace parallel { namespace execution { @@ -319,11 +314,7 @@ namespace hpx { namespace parallel { namespace execution auto && args = hpx::util::forward_as_tuple(std::forward(ts)...); -#if defined(HPX_HAVE_CXX1Y_EXPERIMENTAL_OPTIONAL) - std::experimental::optional out; -#else - boost::optional out; -#endif + hpx::util::optional out; auto && wrapper = [&]() mutable { diff --git a/hpx/parallel/executors/v1/executor_traits.hpp b/hpx/parallel/executors/v1/executor_traits.hpp index 587186b03651..138f2bfb44e9 100644 --- a/hpx/parallel/executors/v1/executor_traits.hpp +++ b/hpx/parallel/executors/v1/executor_traits.hpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -33,12 +34,6 @@ #include #include -#if defined(HPX_HAVE_LIBFUN_STD_EXPERIMENTAL_OPTIONAL) -#include -#else -#include -#endif - namespace hpx { namespace parallel { inline namespace v3 { /////////////////////////////////////////////////////////////////////////// @@ -128,11 +123,7 @@ namespace hpx { namespace parallel { inline namespace v3 auto && args = hpx::util::forward_as_tuple(std::forward(ts)...); -#if defined(HPX_HAVE_LIBFUN_STD_EXPERIMENTAL_OPTIONAL) - std::experimental::optional out; -#else - boost::optional out; -#endif + hpx::util::optional out; auto && wrapper = [&]() mutable { diff --git a/hpx/runtime/threads/run_as_hpx_thread.hpp b/hpx/runtime/threads/run_as_hpx_thread.hpp index 037aaa8f8bf1..a235a2a61543 100644 --- a/hpx/runtime/threads/run_as_hpx_thread.hpp +++ b/hpx/runtime/threads/run_as_hpx_thread.hpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -23,12 +24,6 @@ #include #include -#if defined(HPX_HAVE_LIBFUN_STD_EXPERIMENTAL_OPTIONAL) -#include -#else -#include -#endif - namespace hpx { namespace threads { /////////////////////////////////////////////////////////////////////////// @@ -48,11 +43,7 @@ namespace hpx { namespace threads // Using the optional for storing the returned result value // allows to support non-default-constructible and move-only // types. -#if defined(HPX_HAVE_LIBFUN_STD_EXPERIMENTAL_OPTIONAL) - std::experimental::optional result; -#else - boost::optional result; -#endif + hpx::util::optional result; // This lambda function will be scheduled to run as an HPX // thread