Difference between revisions of "C++20"

From Inkscape Wiki
Jump to navigation Jump to search
Line 9: Line 9:
|-
|-
| <code>std::span</code>  || C++20 || style="background: lightgreen;" | from 1.3? || Handle buffers like standard library containers without risk of overflow. (OK on MacOS)
| <code>std::span</code>  || C++20 || style="background: lightgreen;" | from 1.3? || Handle buffers like standard library containers without risk of overflow. (OK on MacOS)
|-
| <code>std::format</code>|| C++20 || style="background: lightgreen;" | from 1.4? || Better and more efficient formatting of strings.
|-
| <code>std::lerp</code>  || C++20 ||                                  from 1.4? || Linear interpolation.
|-
| <code>std::bit_floor</code> || C++20 ||                              from 1.4? ||
|-
| <code>Concepts</code    || C++20 ||                                  from 1.4? || Safer templating.
|-
| <code>std::make_unique_for_overwrite</code> || C++20 ||              from 1.4? ||
|-
| <code>Ranges</code>    || C++20 ||                                  from 1.4? ||
|-
| <code>Structural Templates</code> || C++20 ||                        from 1.4? ||
|}
|}

Revision as of 15:07, 1 September 2023

See also C++11, C++17.

Some things that will be interesting to use once C++20 is common:

Feature Since Can use? Comment
std::span C++20 from 1.3? Handle buffers like standard library containers without risk of overflow. (OK on MacOS)
std::format C++20 from 1.4? Better and more efficient formatting of strings.
std::lerp C++20 from 1.4? Linear interpolation.
std::bit_floor C++20 from 1.4?
Concepts</code C++20 from 1.4? Safer templating.
std::make_unique_for_overwrite C++20 from 1.4?
Ranges C++20 from 1.4?
Structural Templates C++20 from 1.4?