Skip to content

Commit 800d122

Browse files
committed
docs: Bump C++11 to C++14 as current required
Related to boostorg#677
1 parent 95679b6 commit 800d122

30 files changed

+131
-61
lines changed

CONTRIBUTING.md

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ please follow the workflow explained in this document.
2424

2525
## Prerequisites
2626

27-
- C++11 compiler
27+
- C++14 compiler
2828
- Build and run-time dependencies for tests and examples:
2929
- Boost.Filesystem
3030
- Boost.Test
@@ -359,25 +359,25 @@ Run core tests only specifying location of directory with tests:
359359
360360
```shell
361361
cd libs/gil
362-
b2 cxxstd=11 test/core
362+
b2 cxxstd=14 test/core
363363
```
364364
365365
Run all tests for selected extension (from Boost root directory, as alternative):
366366
367367
```shell
368-
b2 cxxstd=11 libs/gil/test/extension/dynamic_image
369-
b2 cxxstd=11 libs/gil/test/extension/io
370-
b2 cxxstd=11 libs/gil/test/extension/numeric
371-
b2 cxxstd=11 libs/gil/test/extension/toolbox
368+
b2 cxxstd=14 libs/gil/test/extension/dynamic_image
369+
b2 cxxstd=14 libs/gil/test/extension/io
370+
b2 cxxstd=14 libs/gil/test/extension/numeric
371+
b2 cxxstd=14 libs/gil/test/extension/toolbox
372372
```
373373
374374
Run I/O extension tests bundled in target called `simple`:
375375
376376
```shell
377-
b2 cxxstd=11 libs/gil/test/io//simple
377+
b2 cxxstd=14 libs/gil/test/io//simple
378378
```
379379
380-
**TIP:** Pass `b2` feature `cxxstd=11,14,17,2a` to request compilation for
380+
**TIP:** Pass `b2` feature `cxxstd=14,17,2a` to request compilation for
381381
multiple C++ standard versions in single build run.
382382
383383
### Using CMake
@@ -405,17 +405,17 @@ The provided CMake configuration allows a couple of ways to develop Boost.GIL:
405405
406406
For CMake, you only need to build Boost libraries required by Boost.Test library
407407
which is used to run GIL tests. Since the `CMAKE_CXX_STANDARD` option in the current
408-
[CMakeLists.txt](CMakeLists.txt) defaults to C++11, pass the default `cxxstd=11` to `b2`:
408+
[CMakeLists.txt](CMakeLists.txt) defaults to C++14, pass the default `cxxstd=14` to `b2`:
409409
410410
```shell
411411
./b2 headers
412-
./b2 variant=debug,release cxxstd=11 --with-filesystem stage
412+
./b2 variant=debug,release cxxstd=14 --with-filesystem stage
413413
```
414414
415415
or, depending on specific requirements, more complete build:
416416
417417
```shell
418-
./b2 variant=debug,release address-model=32,64 cxxstd=11 --layout=versioned --with-filesystem stage
418+
./b2 variant=debug,release address-model=32,64 cxxstd=14 --layout=versioned --with-filesystem stage
419419
```
420420
421421
If you wish to build tests using different C++ standard version, then adjust the `cxxstd` accordingly.
@@ -447,50 +447,52 @@ Here is an example of such lightweight workflow in Linux environment (Debian-bas
447447
- Configure build with CMake
448448
449449
```shell
450-
mkdir _build
451-
cd _build/
452-
cmake ..
450+
cmake -S . -B _build -DBoost_ADDITIONAL_VERSIONS=1.80 -DBoost_COMPILER=-gcc11 -DBoost_ARCHITECTURE=-x64
453451
```
454452
455-
**TIP:** By default, tests and [examples](example/README.md) are compiled using
456-
the minimum required C++11.
457-
Specify `-DCMAKE_CXX_STANDARD=14|17|20` to use newer version.
453+
By default, tests and [examples](example/README.md) are compiled using
454+
the minimum required C++14.
455+
Specify `-DCMAKE_CXX_STANDARD=17|20` to use newer version.
458456
For more CMake options available for GIL, check `option`-s defined
459457
in the top-level `CMakeLists.txt`.
460458
461-
**TIP:** If CMake is failing to find Boost libraries, especially built
462-
with `--layout=versioned`, you can try a few hacks:
463-
- option `-DBoost_ARCHITECTURE=-x64` to help CMake find Boost 1.66 and above
464-
add an architecture tag to the library file names in versioned build
465-
The option added in CMake 3.13.0.
459+
CMake is failing to find Boost libraries, especially built with `--layout=versioned`,
460+
you can try a few hacks as displayed in the command above:
466461
- option `-DBoost_COMPILER=-gcc5` or `-DBoost_COMPILER=-vc141` to help CMake earlier
467462
than 3.13 match your compiler with toolset used in the Boost library file names
468463
(i.e. `libboost_filesystem-gcc5-mt-x64-1_69` and not `-gcc55-`).
469464
Fixed in CMake 3.13.0.
465+
- option `-DBoost_ARCHITECTURE=-x64` to help CMake find Boost 1.66 and above
466+
add an architecture tag to the library file names in versioned build
467+
The option added in CMake 3.13.0.
468+
- option `-DDBoost_ADDITIONAL_VERSIONS=<unreleased Boost version>` is especially usefull
469+
when testing GIL with staged build of Boost from its `develop` branch.
470470
- if CMake is still failing to find Boost, you may try `-DBoost_DEBUG=ON` to
471471
get detailed diagnostics output from `FindBoost.cmake` module.
472472
473473
- List available CMake targets
474474
475475
```shell
476-
cmake --build . --target help
476+
cmake --build _build --target help
477477
```
478478
479479
- Build selected target with CMake
480480
481481
```shell
482-
cmake --build . --target gil_test_pixel
482+
cmake --build _build --target gil_test_pixel
483483
```
484484
485485
- List available CTest targets
486486
487487
```shell
488+
cd __build
488489
ctest --show-only | grep Test
489490
```
490491
491492
- Run selected test with CTest
492493
493494
```shell
495+
cd __build
494496
ctest -R gil.tests.core.pixel
495497
```
496498
@@ -567,10 +569,10 @@ Thus, below a few basic guidelines are listed.
567569
First and foremost, make sure you are familiar with the official
568570
[Boost Library Requirements and Guidelines](https://www.boost.org/development/requirements.html).
569571
570-
Second, strive for writing idiomatic C++11, clean and elegant code.
572+
Second, strive for writing idiomatic C++14, clean and elegant code.
571573
572574
**NOTE:** *The Boost.GIL source code does not necessary represent clean and elegant
573-
code to look up to. The library has recently entered the transition to C++11.
575+
code to look up to. The library has recently entered the transition to C++14.
574576
Major refactoring overhaul is ongoing.*
575577
576578
Maintain structure your source code files according to the following guidelines:

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Documentation | GitHub Actions | AppVeyor | Azure Pipelines | Regression | Codec
2929

3030
Boost.GIL is a part of the [Boost C++ Libraries](http://github.com/boostorg).
3131

32-
The Boost Generic Image Library (GIL) is a **C++11** header-only library that abstracts image
32+
The Boost Generic Image Library (GIL) is a **C++14** header-only library that abstracts image
3333
representations from algorithms and allows writing code that can work on a
3434
variety of images with performance similar to hand-writing for a specific image type.
3535

@@ -52,11 +52,9 @@ See [example/cmake/README.md](example/cmake/README.md) for CMake configuration e
5252

5353
## Requirements
5454

55-
**NOTE:** The library source code is currently being modernized for C++11.
56-
5755
The Boost Generic Image Library (GIL) requires:
5856

59-
- C++11 compiler (GCC 4.9, clang 3.3, MSVC++ 14.0 (1900) or any later version)
57+
- C++14 compiler (GCC 6, clang 3.9, MSVC++ 14.1 (1910) or any later version)
6058
- Boost header-only libraries
6159

6260
Optionally, in order to build and run tests and examples:

doc/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Boost Generic Image Library
22
===========================
33

4-
The Generic Image Library (GIL) is a C++11 header-only library that abstracts image
4+
The Generic Image Library (GIL) is a C++14 header-only library that abstracts image
55
representations from algorithms and allows writing code that can work on
66
a variety of images with performance similar to hand-writing for a specific
77
image type.

doc/installation.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,11 @@ Compiling
2020
---------
2121

2222
The Boost.GIL library source code should successfully compile with any
23-
compiler with complete C++11 support.
23+
compiler with complete C++14 support.
2424

2525
.. note::
2626

27-
We are planning to drop support for require C++14 support in Boost 1.76 or later,
28-
or selectively drop support for GCC 5 due to its issues with inheriting constructors,
29-
see `discussion for PR #526 <https://github.com/boostorg/gil/pull/526>`_.
27+
Boost.GIL requires C++14 compiler since ince Boost 1.80.
3028

3129
For the actual list of currently tested compilers, check results of the library CI
3230
builds linked from the `README.md <https://github.com/boostorg/gil/blob/develop/README.md>`_

example/adaptive_histogram_equalization.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Adaptive Histogram Equalization (AHE) capabilities in GIL are demonstrated by the program `adaptive_histogram_equalization`, compiled from the sources `example/adaptive_histogram_equalization.cpp`.
44

55
## Synopsis
6+
67
`adaptive_histogram_equalization`
78

89
The program doesn't take any argument on the command line.
@@ -12,9 +13,11 @@ The program doesn't take any argument on the command line.
1213
## Specific requirements
1314

1415
### Build requirements
15-
- A C++ compiler compliant with C++11 or above
16+
17+
- A C++ compiler compliant with C++14 or above
1618
- The PNG library installed and configured.
1719

1820
### Execution requirements
21+
1922
- `adaptive_histogram_equalization` expects to find an image called `test_adaptive.png` in the current directory.
2023

example/adaptive_threshold.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Adaptive Thresholding capabilities in GIL are demonstrated by the program `adaptive_threshold`, compiled from the sources `example/adaptive_threshold.cpp`.
44

55
## Synopsis
6+
67
`adaptive_threshold`
78

89
The program doesn't take any argument on the command line.
@@ -16,8 +17,10 @@ The program doesn't take any argument on the command line.
1617
## Specific requirements
1718

1819
### Build requirements
19-
- A C++ compiler compliant with C++11 or above
20+
21+
- A C++ compiler compliant with C++14 or above
2022
- The PNG library installed and configured.
2123

2224
### Execution requirements
25+
2326
- `adaptive_threshold` expects to find an image called `test_adaptive.png` in the current directory.

example/affine.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Affine transformation capabilities in GIL are demonstrated by the program `affine`, compiled from the sources `example/affine.cpp`.
44

55
## Synopsis
6+
67
`affine`
78

89
The program doesn't take any argument on the command line.
@@ -12,8 +13,10 @@ The program doesn't take any argument on the command line.
1213
## Specific requirements
1314

1415
### Build requirements
15-
- A C++ compiler compliant with C++11 or above
16+
17+
- A C++ compiler compliant with C++14 or above
1618
- The JPEG library installed and configured.
1719

1820
### Execution requirements
21+
1922
- `affine` expects to find an image called `test.jpg` in the current directory.

example/anisotropic_diffusion.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Anisotropic diffusion capabilities in GIL are demonstrated by the program `anisotropic_diffusion`, compiled from the sources `example/anisotropic_diffusion.cpp`.
44

55
## Synopsis
6+
67
`anisoptropic_diffusion input.png output.png gray|rgb iterations kappa`
78
- The first parameter must be the full path to an existing image in the JPEG format for `anisoptropic_diffusion` to process
89
- The second parameter is the full path to the output image of `anisotropic_diffusion`. The directory will *not* be created and must exist.
@@ -15,8 +16,10 @@ Note that both the input and the ouput images must be in the PNG format.
1516
## Specific requirements
1617

1718
### Build requirements
18-
- A C++ compiler compliant with C++11 or above
19+
20+
- A C++ compiler compliant with C++14 or above
1921
- The PNG library installed and configured.
2022

2123
### Execution requirements
24+
2225
`anisotropic_diffusion` has no specific execution requirements.

example/convolution.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Convolution capabilities in GIL are demonstrated by the program `convolution`, compiled from the sources `example/convolution.cpp`.
44

55
## Synopsis
6+
67
`convolution`
78

89
The program doesn't take any argument on the command line.
@@ -12,8 +13,10 @@ The program doesn't take any argument on the command line.
1213
## Specific requirements
1314

1415
### Build requirements
15-
- A C++ compiler compliant with C++11 or above
16+
17+
- A C++ compiler compliant with C++14 or above
1618
- The JPEG library installed and configured.
1719

1820
### Execution requirements
21+
1922
- `convolution` expects to find an image called `test.jpg` in the current directory.

example/convolve2d.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
2d kernel convolution capabilities in GIL are demonstrated by the program `convolve2d`, compiled from the sources `example/convolve2d.cpp`.
44

55
## Synopsis
6+
67
`convolve2d`
78

89
The program doesn't take any argument on the command line.
@@ -14,9 +15,11 @@ Note that the user is expected to press a key to end the program.
1415
## Specific requirements
1516

1617
### Build requirements
17-
- A C++ compiler compliant with C++11 or above
18+
19+
- A C++ compiler compliant with C++14 or above
1820
- The JPEG library installed and configured
1921
- The PNG library installed and configured.
2022

2123
### Execution requirements
24+
2225
- `convolve2d` expects to find an image called `src_view.png` in the current directory.

example/dynamic_image.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Dynamic image manipulation capabilities in GIL are demonstrated by the program `dynamic_image`, compiled from the sources `example/dynamic_image.cpp`.
44

55
## Synopsis
6+
67
`dynamic_image`
78

89
The program doesn't take any argument on the command line.
@@ -12,8 +13,10 @@ The program doesn't take any argument on the command line.
1213
## Specific requirements
1314

1415
### Build requirements
15-
- A C++ compiler compliant with C++11 or above
16+
17+
- A C++ compiler compliant with C++14 or above
1618
- The JPEG library installed and configured
1719

1820
### Execution requirements
21+
1922
- `dynamic_image` expects to find an image called `test.jpg` in the current directory.

example/harris.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Harris corner detection capabilities in GIL are demonstrated by the program `harris`, compiled from the sources `example/harris.cpp` and `hvstack.hpp`.
44

55
## Synopsis
6+
67
`harris input.png window-size discriminant harris-threshold output.png`
78

89
- The first parameter must be the full path to an existing image in the PNG format for `harris` to process
@@ -14,8 +15,10 @@ Harris corner detection capabilities in GIL are demonstrated by the program `har
1415
## Specific requirements
1516

1617
### Build requirements
17-
- A C++ compiler compliant with C++11 or above
18+
19+
- A C++ compiler compliant with C++14 or above
1820
- The PNG library installed and configured
1921

2022
### Execution requirements
23+
2124
- `harris` has no specific execution requirements.

example/hessian.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Hessian feature detection capabilities in GIL are demonstrated by the program `h
1313
## Specific requirements
1414

1515
### Build requirements
16-
- A C++ compiler compliant with C++11 or above
16+
- A C++ compiler compliant with C++14 or above
1717
- The PNG library installed and configured
1818

1919
### Execution requirements

example/histogram.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Histogram capabilities in GIL are demonstrated by the program `histogram`, compiled from the sources `example/histogram.cpp`.
44

55
## Synopsis
6+
67
`histogram`
78

89
The program doesn't take any argument on the command line.
@@ -13,8 +14,10 @@ The program doesn't produce any output.
1314
## Specific requirements
1415

1516
### Build requirements
16-
- A C++ compiler compliant with C++11 or above
17+
18+
- A C++ compiler compliant with C++14 or above
1719
- The PNG library installed and configured.
1820

1921
### Execution requirements
22+
2023
- `histogram` expects to find an image called `test_adaptive.png` in the current directory.

example/histogram_equalization.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Histogram equalization capabilities in GIL are demonstrated by the program `histogram_equalization`, compiled from the sources `example/histogram_equalization.cpp`.
44

55
## Synopsis
6+
67
`histogram_equalization`
78

89
The program doesn't take any argument on the command line.
@@ -58,8 +59,10 @@ and is a hypotenuse! Using trivial trigonometry we know that the length we are s
5859
## Specific requirements
5960

6061
### Build requirements
61-
- A C++ compiler compliant with C++11 or above
62+
63+
- A C++ compiler compliant with C++14 or above
6264
- The PNG library installed and configured.
6365

6466
### Execution requirements
67+
6568
- `histogram_equalization` expects to find an image called `test_adaptive.png` in the current directory.

0 commit comments

Comments
 (0)