Commit eaf38e63 by Maarten L. Hekkelman

Merge branch 'trunk' of github.com:PDB-REDO/libcifpp into trunk

parents 4012a71f 5a71dbec
......@@ -223,14 +223,17 @@ HEADERS = \
install-lib: lib
install -d $(libdir)
$(LIBTOOL) --mode=install install $(LIB_TARGET) $(libdir)
install -d $(DATADIR)/dictionaries
for d in mmcif_ddl.dic mmcif_pdbx.dic; do \
install -D -m644 rsrc/dictionaries/$$d $(DATADIR)/dictionaries/$$d; \
install -m644 rsrc/dictionaries/$$d $(DATADIR)/dictionaries/$$d; \
done
.PHONY: install-dev
install-dev:
for f in $(HEADERS); do install -D include/cif++/$$f $(includedir)/cif++/$$f; done
install -m 644 -D $(LIB_NAME).pc $(pkgconfigdir)/$(LIB_NAME).pc
install -d $(includedir)/cif++
for f in $(HEADERS); do install include/cif++/$$f $(includedir)/cif++/$$f; done
install -d $(pkgconfigdir)
install -m 644 $(LIB_NAME).pc $(pkgconfigdir)/$(LIB_NAME).pc
.PHONY: install
install: install-lib install-dev
......
#include <boost/regex.hpp>
int main()
{
boost::regex rx("a*b");
if (boost::regex_match("aab", rx))
;
return 0;
}
#include <clipper/core/atomsf.h>
int main()
{
auto sf = clipper::ScatteringFactors::instance()["C"];
return 0;
}
#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; });
}
......@@ -3919,7 +3919,6 @@ ac_config_headers="$ac_config_headers include/cif++/Config.hpp"
# 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,8 +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))])
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
......
......@@ -32,6 +32,7 @@
#include <regex>
#include <iostream>
#include <sstream>
#include <set>
#include <list>
......@@ -873,9 +874,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 +894,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 +1793,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);
}
......
......@@ -630,7 +630,7 @@ RowComparator::RowComparator(Category* cat, KeyIter b, KeyIter e)
using namespace std::placeholders;
mComp.emplace_back(ix, bind(&ValidateType::compare, tv, _1, _2));
mComp.emplace_back(ix, std::bind(&ValidateType::compare, tv, _1, _2));
}
}
......
......@@ -29,6 +29,7 @@
#include <map>
#include <set>
#include <system_error>
#include <stack>
#include <boost/date_time/gregorian/gregorian.hpp>
#include <boost/algorithm/string.hpp>
......
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