Commit 6675768a by Maarten L. Hekkelman

reduce requirements for c++ compliance

parent 63256f09
......@@ -3919,60 +3919,6 @@ ac_config_headers="$ac_config_headers include/cif++/Config.hpp"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler standards compliance" >&5
$as_echo_n "checking compiler standards compliance... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <algorithm>
template<typename COMP>
class foo
{
public:
foo(int a, COMP&& b)
: m_a(a), m_b(std::move(b)) {}
int m_a;
COMP m_b;
};
void bar(const int& b)
{
int c = 1;
auto f = new foo(c, [tag = c, b](const int& x)
{ x < b; });
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
else
as_fn_error $? "Your c++ compiler is not capable of compiling libcifpp, please upgrade" "$LINENO" 5
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"ok\"" >&5
$as_echo "\"ok\"" >&6; }
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
......
......@@ -15,14 +15,14 @@ AC_CONFIG_HEADERS([include/cif++/Config.hpp])
AC_PREFIX_DEFAULT(/usr/local)
AC_DEFUN([read_test], [AC_LANG_SOURCE(
esyscmd(tools/m4esc.sh config-tests/$1))])
AC_MSG_CHECKING([compiler standards compliance])
AC_COMPILE_IFELSE(
[read_test(cpp-17-test.cpp)], [],
[AC_MSG_ERROR([Your c++ compiler is not capable of compiling libcifpp, please upgrade])])
AC_MSG_RESULT(ok)
dnl AC_DEFUN([read_test], [AC_LANG_SOURCE(
dnl esyscmd(tools/m4esc.sh config-tests/$1))])
dnl
dnl AC_MSG_CHECKING([compiler standards compliance])
dnl AC_COMPILE_IFELSE(
dnl [read_test(cpp-17-test.cpp)], [],
dnl [AC_MSG_ERROR([Your c++ compiler is not capable of compiling libcifpp, please upgrade])])
dnl AC_MSG_RESULT(ok)
AC_PROG_INSTALL
AC_ENABLE_STATIC
......
......@@ -873,9 +873,9 @@ std::string KeyIsNotConditionImpl<std::string>::str() const
return mItemTag + " != " + mValue;
}
template<typename COMP>
struct KeyCompareConditionImpl : public ConditionImpl
{
template<typename COMP>
KeyCompareConditionImpl(const std::string& ItemTag, COMP&& comp)
: mItemTag(ItemTag), mComp(std::move(comp)) {}
......@@ -893,7 +893,7 @@ struct KeyCompareConditionImpl : public ConditionImpl
std::string mItemTag;
size_t mItemIx;
COMP mComp;
std::function<bool(const Category&, const Row&)> mComp;
};
struct KeyMatchesConditionImpl : public ConditionImpl
......@@ -1792,8 +1792,7 @@ void KeyIsNotConditionImpl<T>::prepare(const Category& c)
mItemIx = c.getColumnIndex(mItemTag);
}
template<typename T>
void KeyCompareConditionImpl<T>::prepare(const Category& c)
inline void KeyCompareConditionImpl::prepare(const Category& c)
{
mItemIx = c.getColumnIndex(mItemTag);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment