From 896dee305dc3ddee6d5d6fb505269f892451b440 Mon Sep 17 00:00:00 2001 From: Joris Vaillant Date: Mon, 30 Sep 2024 16:20:43 +0200 Subject: [PATCH 1/3] core: Allow cxx11 compatibility core: Fix enable_if use --- include/eigenpy/deprecation-policy.hpp | 2 +- include/eigenpy/numpy.hpp | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/eigenpy/deprecation-policy.hpp b/include/eigenpy/deprecation-policy.hpp index e8660523..42de0213 100644 --- a/include/eigenpy/deprecation-policy.hpp +++ b/include/eigenpy/deprecation-policy.hpp @@ -13,7 +13,7 @@ enum class DeprecationType { DEPRECATION, FUTURE }; namespace detail { -constexpr PyObject *deprecationTypeToPyObj(DeprecationType dep) { +PyObject *deprecationTypeToPyObj(DeprecationType dep) { switch (dep) { case DeprecationType::DEPRECATION: return PyExc_DeprecationWarning; diff --git a/include/eigenpy/numpy.hpp b/include/eigenpy/numpy.hpp index f74349dd..bf738b32 100644 --- a/include/eigenpy/numpy.hpp +++ b/include/eigenpy/numpy.hpp @@ -150,15 +150,16 @@ struct NumpyEquivalentType { template struct NumpyEquivalentType< - Scalar, std::enable_if_t::value && - std::is_same::value> > { + Scalar, + typename std::enable_if::value && + std::is_same::value>::type> { enum { type_code = NPY_LONGLONG }; }; template struct NumpyEquivalentType< - Scalar, - std::enable_if_t::value && - std::is_same::value> > { + Scalar, typename std::enable_if< + !std::is_same::value && + std::is_same::value>::type> { enum { type_code = NPY_ULONGLONG }; }; From 6bf9767b845cd266428b85eb1ae22e11eed79cab Mon Sep 17 00:00:00 2001 From: Joris Vaillant Date: Mon, 30 Sep 2024 16:43:27 +0200 Subject: [PATCH 2/3] ci: Force build with C++11 --- .github/workflows/macos-linux-conda.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/macos-linux-conda.yml b/.github/workflows/macos-linux-conda.yml index e4821726..79063d11 100644 --- a/.github/workflows/macos-linux-conda.yml +++ b/.github/workflows/macos-linux-conda.yml @@ -101,7 +101,8 @@ jobs: -DPYTHON_EXECUTABLE=$(which python3) \ -DGENERATE_PYTHON_STUBS=ON \ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ - -DCMAKE_CXX_FLAGS=${{ matrix.cxx_options }} + -DCMAKE_CXX_FLAGS=${{ matrix.cxx_options }} \ + -DCMAKE_CXX_STANDARD=11 cmake --build . -j3 ctest --output-on-failure cmake --install . From 2046b4ceef172dfee731ede377966111c148796d Mon Sep 17 00:00:00 2001 From: Joris Vaillant Date: Mon, 30 Sep 2024 16:43:34 +0200 Subject: [PATCH 3/3] changelog: Add changelog entry --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d925540..01eda53a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Fixed + +- Don't use C++14 feature ([#510](https://github.com/stack-of-tasks/eigenpy/pull/510)) + ## [3.10.0] - 2024-09-26 ### Added