Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit caa750e

Browse files
authored
Merge pull request #27012 from QuLogic/cpp17
Bump required C++ standard to c++17
2 parents 458325e + 6e46393 commit caa750e

File tree

4 files changed

+40
-34
lines changed

4 files changed

+40
-34
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Extensions require C++17
2+
~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
Matplotlib now requires a compiler that supports C++17 in order to build its extensions.
5+
According to `SciPy's analysis
6+
<https://docs.scipy.org/doc/scipy/dev/toolchain.html#c-language-standards>`_, this
7+
should be available on all supported platforms.

doc/devel/dependencies.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ in your target environment manually:
233233
C++ compiler
234234
------------
235235

236-
Matplotlib requires a C++ compiler that supports C++11, and each platform has a
236+
Matplotlib requires a C++ compiler that supports C++17, and each platform has a
237237
development environment that must be installed before a compiler can be installed.
238238

239239
.. tab-set::
@@ -277,18 +277,18 @@ Xcode, VS Code or Linux package manager. Choose **one** compiler from this list:
277277
- platforms
278278
- notes
279279
* - GCC
280-
- **4.8.1**
280+
- **7.2**
281281
- Linux, macOS, Windows
282-
- `gcc 4.8.1 <https://gcc.gnu.org/projects/cxx-status.html#cxx11>`_,
282+
- `gcc 7.2 <https://gcc.gnu.org/projects/cxx-status.html#cxx17>`_,
283283
`GCC: Binaries <https://gcc.gnu.org/install/binaries.html>`_,
284284
* - Clang (LLVM)
285-
- **3.3**
285+
- **5**
286286
- Linux, macOS
287-
- `clang 3.3 <https://clang.llvm.org/cxx_status.html>`_, `LLVM <https://releases.llvm.org/download.html>`_
287+
- `clang 5 <https://clang.llvm.org/cxx_status.html>`_, `LLVM <https://releases.llvm.org/download.html>`_
288288
* - MSVC++
289-
- **14.0**
289+
- **16.0**
290290
- Windows
291-
- `Visual Studio 2015 C++ <https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=msvc-140>`_
291+
- `Visual Studio 2019 C++ <https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=msvc-160>`_
292292

293293

294294

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ project(
1010
meson_version: '>=1.1.0',
1111
default_options: [
1212
'b_lto=true',
13-
'cpp_std=c++11',
13+
'cpp_std=c++17',
1414
'auto_features=disabled', # Force FreeType to avoid extra dependencies.
1515
],
1616
)

src/_image_wrapper.cpp

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,41 +10,40 @@
1010
* */
1111

1212
const char* image_resample__doc__ =
13-
"Resample input_array, blending it in-place into output_array, using an\n"
14-
"affine transformation.\n\n"
13+
R"""(Resample input_array, blending it in-place into output_array, using an affine transform.
1514
16-
"Parameters\n"
17-
"----------\n"
18-
"input_array : 2-d or 3-d NumPy array of float, double or `numpy.uint8`\n"
19-
" If 2-d, the image is grayscale. If 3-d, the image must be of size\n"
20-
" 4 in the last dimension and represents RGBA data.\n\n"
15+
Parameters
16+
----------
17+
input_array : 2-d or 3-d NumPy array of float, double or `numpy.uint8`
18+
If 2-d, the image is grayscale. If 3-d, the image must be of size 4 in the last
19+
dimension and represents RGBA data.
2120
22-
"output_array : 2-d or 3-d NumPy array of float, double or `numpy.uint8`\n"
23-
" The dtype and number of dimensions must match `input_array`.\n\n"
21+
output_array : 2-d or 3-d NumPy array of float, double or `numpy.uint8`
22+
The dtype and number of dimensions must match `input_array`.
2423
25-
"transform : matplotlib.transforms.Transform instance\n"
26-
" The transformation from the input array to the output array.\n\n"
24+
transform : matplotlib.transforms.Transform instance
25+
The transformation from the input array to the output array.
2726
28-
"interpolation : int, default: NEAREST\n"
29-
" The interpolation method. Must be one of the following constants\n"
30-
" defined in this module:\n\n"
27+
interpolation : int, default: NEAREST
28+
The interpolation method. Must be one of the following constants defined in this
29+
module:
3130
32-
" NEAREST, BILINEAR, BICUBIC, SPLINE16, SPLINE36,\n"
33-
" HANNING, HAMMING, HERMITE, KAISER, QUADRIC, CATROM, GAUSSIAN,\n"
34-
" BESSEL, MITCHELL, SINC, LANCZOS, BLACKMAN\n\n"
31+
NEAREST, BILINEAR, BICUBIC, SPLINE16, SPLINE36, HANNING, HAMMING, HERMITE, KAISER,
32+
QUADRIC, CATROM, GAUSSIAN, BESSEL, MITCHELL, SINC, LANCZOS, BLACKMAN
3533
36-
"resample : bool, optional\n"
37-
" When `True`, use a full resampling method. When `False`, only\n"
38-
" resample when the output image is larger than the input image.\n\n"
34+
resample : bool, optional
35+
When `True`, use a full resampling method. When `False`, only resample when the
36+
output image is larger than the input image.
3937
40-
"alpha : float, default: 1\n"
41-
" The transparency level, from 0 (transparent) to 1 (opaque).\n\n"
38+
alpha : float, default: 1
39+
The transparency level, from 0 (transparent) to 1 (opaque).
4240
43-
"norm : bool, default: False\n"
44-
" Whether to norm the interpolation function.\n\n"
41+
norm : bool, default: False
42+
Whether to norm the interpolation function.
4543
46-
"radius: float, default: 1\n"
47-
" The radius of the kernel, if method is SINC, LANCZOS or BLACKMAN.\n";
44+
radius: float, default: 1
45+
The radius of the kernel, if method is SINC, LANCZOS or BLACKMAN.
46+
)""";
4847

4948

5049
static pybind11::array_t<double>

0 commit comments

Comments
 (0)