Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Intel 18+ required #2577

Merged
merged 2 commits into from Oct 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions README.rst
Expand Up @@ -34,7 +34,7 @@ grown beyond Boost.Python in many ways, leading to dramatically simpler
binding code in many common situations.

Tutorial and reference documentation is provided at
`pybind11.readthedocs.io <https://pybind11.readthedocs.io/en/latest>`_).
`pybind11.readthedocs.io <https://pybind11.readthedocs.io/en/latest>`_.
A PDF version of the manual is available
`here <https://media.readthedocs.org/pdf/pybind11/master/pybind11.pdf>`_.
And the source code is always available at
Expand Down Expand Up @@ -113,9 +113,7 @@ Supported compilers
newer)
2. GCC 4.8 or newer
3. Microsoft Visual Studio 2015 Update 3 or newer
4. Intel C++ compiler 17 or newer (16 with pybind11 v2.0 and 15 with
pybind11 v2.0 and a
`workaround <https://github.com/pybind/pybind11/issues/276>`_)
4. Intel C++ compiler 18 or newer
5. Cygwin/GCC (tested on 2.5.1)
6. NVCC (CUDA 11 tested)
7. NVIDIA PGI (20.7 and 20.9 tested)
Expand Down
6 changes: 4 additions & 2 deletions docs/changelog.rst
Expand Up @@ -48,7 +48,7 @@ New features:
to have a member with the same name as a parent (such as an enum).
`#2335 <https://github.com/pybind/pybind11/pull/2335>`_

Assisting in writing more correct code:
Code correctness features:

* Error now thrown when ``__init__`` is forgotten on subclasses.
`#2152 <https://github.com/pybind/pybind11/pull/2152>`_
Expand Down Expand Up @@ -97,7 +97,7 @@ Packaging / building improvements:
site-packages location in your ``CMAKE_MODULE_PATH``. Or you can use the
new ``pybind11[global]`` extra when you install ``pybind11``, which
installs the CMake files and headers into your base environment in the
standard location
standard location.

* ``pybind11-config`` is another way to write ``python -m pybind11`` if you
have your PATH set up.
Expand Down Expand Up @@ -214,6 +214,8 @@ Smaller or developer focused features:
* NVIDIA PGI compilers now supported and tested in CI.
`#2475 <https://github.com/pybind/pybind11/pull/2475>`_

* Intel 18 now explicitly required.

* Extensive style checking in CI, with `pre-commit`_ support. Code
modernization, checked by clang-tidy.

Expand Down
7 changes: 0 additions & 7 deletions include/pybind11/cast.h
Expand Up @@ -1512,14 +1512,7 @@ struct copyable_holder_caster : public type_caster_base<type> {
// see issue #2180
explicit operator type&() { return *(static_cast<type *>(this->value)); }
explicit operator holder_type*() { return std::addressof(holder); }

// Workaround for Intel compiler bug
// see pybind11 issue 94
#if defined(__ICC) || defined(__INTEL_COMPILER)
operator holder_type&() { return holder; }
#else
explicit operator holder_type&() { return holder; }
#endif

static handle cast(const holder_type &src, return_value_policy, handle) {
const auto *ptr = holder_helper<holder_type>::get(src);
Expand Down
8 changes: 4 additions & 4 deletions include/pybind11/detail/common.h
Expand Up @@ -47,8 +47,8 @@

// Compiler version assertions
#if defined(__INTEL_COMPILER)
# if __INTEL_COMPILER < 1700
# error pybind11 requires Intel C++ compiler v17 or newer
# if __INTEL_COMPILER < 1800
# error pybind11 requires Intel C++ compiler v18 or newer
# endif
#elif defined(__clang__) && !defined(__apple_build_version__)
# if __clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 3)
Expand Down Expand Up @@ -508,10 +508,10 @@ template <bool... Bs> using select_indices = typename select_indices_impl<index_
template <bool B> using bool_constant = std::integral_constant<bool, B>;
template <typename T> struct negation : bool_constant<!T::value> { };

// PGI cannot detect operator delete with the "compatible" void_t impl, so
// PGI/Intel cannot detect operator delete with the "compatible" void_t impl, so
// using the new one (C++14 defect, so generally works on newer compilers, even
// if not in C++17 mode)
#if defined(__PGIC__)
#if defined(__PGIC__) || defined(__INTEL_COMPILER)
template<typename... > using void_t = void;
#else
template <typename...> struct void_t_impl { using type = void; };
Expand Down
5 changes: 4 additions & 1 deletion tests/test_virtual_functions.py
Expand Up @@ -163,7 +163,10 @@ def f(self):
# PyPy: Reference count > 1 causes call with noncopyable instance
# to fail in ncv1.print_nc()
@pytest.mark.xfail("env.PYPY")
@pytest.mark.skipif(not hasattr(m, "NCVirt"), reason="NCVirt test broken on ICPC")
@pytest.mark.skipif(
not hasattr(m, "NCVirt"),
reason="NCVirt does not work on Intel/PGI/NVCC compilers"
)
def test_move_support():
class NCVirtExt(m.NCVirt):
def get_noncopyable(self, a, b):
Expand Down