From 74df1be02c96e2c96d71916cb7c95ad5944693fe Mon Sep 17 00:00:00 2001 From: Phil Miller Date: Thu, 16 Mar 2017 16:41:53 -0500 Subject: [PATCH] Make test for std::is_constructible more specific, to keep supporting libstdc++ from GCC 4.4 Change-Id: Icc951296d956d5cf759c427d406c6cba051749ad --- src/ck-core/charm++.h | 2 +- src/scripts/configure | 19 +++++++++++++++++++ src/scripts/configure.in | 15 +++++++++++++++ src/scripts/conv-autoconfig.h.in | 3 +++ 4 files changed, 38 insertions(+), 1 deletion(-) diff --git a/src/ck-core/charm++.h b/src/ck-core/charm++.h index 5ec738b2bd..820621c4e7 100644 --- a/src/ck-core/charm++.h +++ b/src/ck-core/charm++.h @@ -261,7 +261,7 @@ class Chare { #endif }; -#if CMK_HAS_ALIGNMENT_OF +#if CMK_HAS_IS_CONSTRUCTIBLE #include template ::value> diff --git a/src/scripts/configure b/src/scripts/configure index 543ea1e157..8c03f0920e 100755 --- a/src/scripts/configure +++ b/src/scripts/configure @@ -2683,6 +2683,25 @@ _ACEOF in64bit=$strictpass +### Check if compiler supports std::is_constructible<> ### +cat > $t < + +struct s { + s(int a) { } +}; + +bool foo() +{ + return std::is_constructible::value; +} +EOT +test_cxx "whether compiler supports std::is_constructible" "yes" "no" "" + +cat >>confdefs.h <<_ACEOF +#define CMK_HAS_IS_CONSTRUCTIBLE $strictpass +_ACEOF + ### Check if compiler supports std::alignment_of<> ### cat > $t < ### +cat > $t < + +struct s { + s(int a) { } +}; + +bool foo() +{ + return std::is_constructible::value; +} +EOT +test_cxx "whether compiler supports std::is_constructible" "yes" "no" "" +AC_DEFINE_UNQUOTED(CMK_HAS_IS_CONSTRUCTIBLE, $strictpass, [whether compiler supports std::is_constructible]) ### Check if compiler supports std::alignment_of<> ### cat > $t <