diff --git a/CMakeLists.txt b/CMakeLists.txt index 986848dbf174..91693bcbdc8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -787,6 +787,12 @@ hpx_check_for_cxx11_deleted_functions( hpx_check_for_cxx11_explicit_cvt_ops( REQUIRED "HPX needs support for C++11 explicit conversion operators") +hpx_check_for_cxx11_explicit_variadic_templates( + DEFINITIONS HPX_HAVE_CXX11_EXPLICIT_VARIADIC_TEMPLATES) + +hpx_check_for_cxx11_extended_friend_declarations( + DEFINITIONS HPX_HAVE_CXX11_EXTENDED_FRIEND_DECLARATIONS) + hpx_check_for_cxx11_function_template_default_args( REQUIRED "HPX needs support for C++11 defaulted function template arguments") @@ -823,12 +829,6 @@ hpx_check_for_cxx11_variadic_macros( hpx_check_for_cxx11_variadic_templates( REQUIRED "HPX needs support for C++11 variadic templates") -hpx_check_for_cxx11_explicit_variadic_templates( - DEFINITIONS HPX_HAVE_CXX11_EXPLICIT_VARIADIC_TEMPLATES) - -hpx_check_for_cxx11_extended_friend_declarations( - DEFINITIONS HPX_HAVE_CXX11_EXTENDED_FRIEND_DECLARATIONS) - # Check the availability of certain C++11 library features hpx_check_for_cxx11_std_array( DEFINITIONS HPX_HAVE_CXX11_STD_ARRAY) @@ -854,6 +854,9 @@ hpx_check_for_cxx11_std_is_null_pointer( hpx_check_for_cxx11_std_is_placeholder( DEFINITIONS HPX_HAVE_CXX11_STD_IS_PLACEHOLDER) +hpx_check_for_cxx11_std_is_trivially_copyable( + DEFINITIONS HPX_HAVE_CXX11_STD_IS_TRIVIALLY_COPYABLE) + hpx_check_for_cxx11_std_lock_guard( REQUIRED "HPX needs support for C++11 std::lock_guard") @@ -881,9 +884,6 @@ hpx_check_for_cxx11_std_unordered_set( hpx_check_for_cxx11_std_type_traits( DEFINITIONS HPX_HAVE_CXX11_STD_TYPE_TRAITS) -hpx_check_for_cxx11_is_trivially_copyable( - DEFINITIONS HPX_HAVE_CXX11_IS_TRIVIALLY_COPYABLE) - # Check the availability of certain C++14 language features hpx_check_for_cxx14_constexpr( DEFINITIONS HPX_HAVE_CXX14_CONSTEXPR) diff --git a/cmake/HPX_AddConfigTest.cmake b/cmake/HPX_AddConfigTest.cmake index 9a5d39c93ae9..47bfb151868e 100644 --- a/cmake/HPX_AddConfigTest.cmake +++ b/cmake/HPX_AddConfigTest.cmake @@ -192,6 +192,20 @@ macro(hpx_check_for_cxx11_explicit_cvt_ops) FILE ${ARGN}) endmacro() +############################################################################### +macro(hpx_check_for_cxx11_explicit_variadic_templates) + add_hpx_config_test(HPX_WITH_CXX11_EXPLICIT_VARIADIC_TEMPLATES + SOURCE cmake/tests/cxx11_explicit_variadic_templates.cpp + FILE ${ARGN}) +endmacro() + +############################################################################### +macro(hpx_check_for_cxx11_extended_friend_declarations) + add_hpx_config_test(HPX_WITH_CXX11_EXTENDED_FRIEND_DECLARATIONS + SOURCE cmake/tests/cxx11_extended_friend_declarations.cpp + FILE ${ARGN}) +endmacro() + ############################################################################### macro(hpx_check_for_cxx11_function_template_default_args) add_hpx_config_test(HPX_WITH_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS @@ -276,13 +290,6 @@ macro(hpx_check_for_cxx11_variadic_templates) FILE ${ARGN}) endmacro() -############################################################################### -macro(hpx_check_for_cxx11_explicit_variadic_templates) - add_hpx_config_test(HPX_WITH_CXX11_EXPLICIT_VARIADIC_TEMPLATES - SOURCE cmake/tests/cxx11_explicit_variadic_templates.cpp - FILE ${ARGN}) -endmacro() - ############################################################################### macro(hpx_check_for_cxx11_std_array) add_hpx_config_test(HPX_WITH_CXX11_ARRAY @@ -339,6 +346,13 @@ macro(hpx_check_for_cxx11_std_is_placeholder) FILE ${ARGN}) endmacro() +############################################################################### +macro(hpx_check_for_cxx11_std_is_trivially_copyable) + add_hpx_config_test(HPX_WITH_CXX11_IS_TRIVIALLY_COPYABLE + SOURCE cmake/tests/cxx11_std_is_trivially_copyable.cpp + FILE ${ARGN}) +endmacro() + ############################################################################### macro(hpx_check_for_cxx11_std_lock_guard) add_hpx_config_test(HPX_WITH_CXX11_LOCK_GUARD @@ -402,20 +416,6 @@ macro(hpx_check_for_cxx11_std_unordered_set) FILE ${ARGN}) endmacro() -############################################################################### -macro(hpx_check_for_cxx11_extended_friend_declarations) - add_hpx_config_test(HPX_WITH_CXX11_EXTENDED_FRIEND_DECLARATIONS - SOURCE cmake/tests/cxx11_extended_friend_declarations.cpp - FILE ${ARGN}) -endmacro() - -############################################################################### -macro(hpx_check_for_cxx11_is_trivially_copyable) - add_hpx_config_test(HPX_WITH_CXX11_WITH_IS_TRIVIALLY_COPYABLE - SOURCE cmake/tests/cxx11_std_is_trivially_copyable.cpp - FILE ${ARGN}) -endmacro() - ############################################################################### macro(hpx_check_for_cxx14_constexpr) add_hpx_config_test(HPX_WITH_CXX14_CONSTEXPR diff --git a/cmake/tests/cxx11_std_is_trivially_copyable.cpp b/cmake/tests/cxx11_std_is_trivially_copyable.cpp index 9d39dc9da456..7b3ff4538fd1 100644 --- a/cmake/tests/cxx11_std_is_trivially_copyable.cpp +++ b/cmake/tests/cxx11_std_is_trivially_copyable.cpp @@ -1,5 +1,5 @@ //////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2015 Agustin Berge +// 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) @@ -9,5 +9,5 @@ int main() { - int check_is_triviallycopyable[std::is_trivially_copyable::value ? 1 : -1]; + int check_trivially_copyable[std::is_trivially_copyable::value ? 1 : -1]; } diff --git a/hpx/parallel/util/transfer.hpp b/hpx/parallel/util/transfer.hpp index 852816560bf9..b249c5338fbb 100644 --- a/hpx/parallel/util/transfer.hpp +++ b/hpx/parallel/util/transfer.hpp @@ -22,7 +22,7 @@ namespace hpx { namespace parallel { namespace util namespace detail { -#if defined(HPX_HAVE_CXX11_IS_TRIVIALLY_COPYABLE) +#if defined(HPX_HAVE_CXX11_STD_IS_TRIVIALLY_COPYABLE) /////////////////////////////////////////////////////////////////////// template HPX_FORCEINLINE static std::pair @@ -60,7 +60,7 @@ namespace hpx { namespace parallel { namespace util } }; -#if defined(HPX_HAVE_CXX11_IS_TRIVIALLY_COPYABLE) +#if defined(HPX_HAVE_CXX11_STD_IS_TRIVIALLY_COPYABLE) template <> struct copy_helper { @@ -99,7 +99,7 @@ namespace hpx { namespace parallel { namespace util } }; -#if defined(HPX_HAVE_CXX11_IS_TRIVIALLY_COPYABLE) +#if defined(HPX_HAVE_CXX11_STD_IS_TRIVIALLY_COPYABLE) template <> struct copy_n_helper { @@ -138,7 +138,7 @@ namespace hpx { namespace parallel { namespace util } }; -#if defined(HPX_HAVE_CXX11_IS_TRIVIALLY_COPYABLE) +#if defined(HPX_HAVE_CXX11_STD_IS_TRIVIALLY_COPYABLE) template <> struct move_helper { @@ -177,7 +177,7 @@ namespace hpx { namespace parallel { namespace util } }; -#if defined(HPX_HAVE_CXX11_IS_TRIVIALLY_COPYABLE) +#if defined(HPX_HAVE_CXX11_STD_IS_TRIVIALLY_COPYABLE) template <> struct move_n_helper { diff --git a/hpx/traits.hpp b/hpx/traits.hpp index edbd68925be3..e50d6083d49a 100644 --- a/hpx/traits.hpp +++ b/hpx/traits.hpp @@ -233,7 +233,7 @@ namespace hpx { namespace traits /////////////////////////////////////////////////////////////////////////// struct general_pointer_tag {}; -#if defined(HPX_HAVE_CXX11_IS_TRIVIALLY_COPYABLE) +#if defined(HPX_HAVE_CXX11_STD_IS_TRIVIALLY_COPYABLE) struct trivially_copyable_pointer_tag : general_pointer_tag {}; #endif diff --git a/hpx/traits/is_bitwise_serializable.hpp b/hpx/traits/is_bitwise_serializable.hpp index 5f29b114968e..370e59605698 100644 --- a/hpx/traits/is_bitwise_serializable.hpp +++ b/hpx/traits/is_bitwise_serializable.hpp @@ -14,7 +14,7 @@ namespace hpx { namespace traits { template struct is_bitwise_serializable -#ifdef HPX_HAVE_CXX11_IS_TRIVIALLY_COPYABLE +#ifdef HPX_HAVE_CXX11_STD_IS_TRIVIALLY_COPYABLE : std::is_trivially_copyable #else : std::is_arithmetic diff --git a/hpx/traits/pointer_category.hpp b/hpx/traits/pointer_category.hpp index 256618014bfb..993cb4c81f0c 100644 --- a/hpx/traits/pointer_category.hpp +++ b/hpx/traits/pointer_category.hpp @@ -25,7 +25,7 @@ namespace hpx { namespace traits return general_pointer_tag(); } -#if defined(HPX_HAVE_CXX11_IS_TRIVIALLY_COPYABLE) +#if defined(HPX_HAVE_CXX11_STD_IS_TRIVIALLY_COPYABLE) namespace detail {