diff --git a/CHANGES b/CHANGES index 55f18b9b2..882b5f976 100644 --- a/CHANGES +++ b/CHANGES @@ -3,9 +3,12 @@ Following is a brief summary of changes made in each release of Libint. -- 2017-xx-yy: 2.4.0 +- 2017-xx-yy: 2.3.2 - +- 2017-05-03: 2.3.1 + - minor fixes to libint2::any + - 2017-05-02: 2.3.0 - bumped the compiler source license to GPLv3, generated code is LGPLv3. - replaced non-standard-conforming libint2::any with a homegrown C++17-conforming any; diff --git a/CITATION b/CITATION index 43949659b..1b4bd6174 100644 --- a/CITATION +++ b/CITATION @@ -4,12 +4,12 @@ If you publish results using LIBINT, please cite it using: An unmodified standard release: -Libint: A library for the evaluation of molecular integrals of many-body operators over Gaussian functions, Version 2.3.0 +Libint: A library for the evaluation of molecular integrals of many-body operators over Gaussian functions, Version 2.3.1 Edward F. Valeev, http://libint.valeyev.net/ . A modified release: -Libint: A library for the evaluation of molecular integrals of many-body operators over Gaussian functions, Version 2.3.0 +Libint: A library for the evaluation of molecular integrals of many-body operators over Gaussian functions, Version 2.3.1 Edward F. Valeev, http://libint.valeyev.net/ . Modified by An Author, institution, location, year. The literature citation in bibtex format is: @@ -18,7 +18,7 @@ The literature citation in bibtex format is: author = "E.~F.~Valeev", title = “Libint: A library for the evaluation of molecular integrals of many-body operators over Gaussian functions", howpublished = "http://libint.valeyev.net/", - note = "version 2.3.0", + note = "version 2.3.1", year = 2017 } diff --git a/configure.ac b/configure.ac index 6ee7c5c46..09cd22bc9 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -define([libint_mmm_version],[2.3.0]) +define([libint_mmm_version],[2.3.1]) define([libint_buildid],[]) define([libint_so_version],[2:2:0]) diff --git a/export/configure.export b/export/configure.export index 74d3024d0..108a9a913 100644 --- a/export/configure.export +++ b/export/configure.export @@ -1,4 +1,4 @@ -define([libint_mmm_version],[2.3.0]) +define([libint_mmm_version],[2.3.1]) define([libint_buildid],[]) define([libint_so_version],[2:2:0]) diff --git a/include/libint2/util/any.h b/include/libint2/util/any.h index 0d5555a0e..392be280f 100644 --- a/include/libint2/util/any.h +++ b/include/libint2/util/any.h @@ -33,6 +33,14 @@ namespace libint2 { #if __cplusplus >= 201703L using std::any; #else + +namespace detail { +// true if decayed T is Base, or is derived from it +template +using disable_if_same_or_derived = typename std::enable_if< + !std::is_base_of::type>::value>::type; +}; + /// a partial C++17 std::any implementation (and less efficient than can be) class any { public: @@ -40,7 +48,8 @@ class any { any() : impl_(nullptr) {} any(const any& other) : impl_(other.impl_->clone()) {} any(any&& other) = default; - template + template > any(ValueType&& value) : impl_(new impl::type>( std::forward(value))) {} @@ -54,9 +63,10 @@ class any { impl_ = std::move(rhs.impl_); return *this; } - template - any& operator=( ValueType&& rhs ) { - impl_ = decltype(impl_)(new impl::type> ( + template > + any& operator=(ValueType&& rhs) { + impl_ = decltype(impl_)(new impl::type>( std::forward(rhs))); return *this; }