-
Notifications
You must be signed in to change notification settings - Fork 608
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
api: various deprecations in array_view.h, benchmark.h, bit.h, color.…
…h, errorhandler.h (#4335) * array_view.h: Remove this long-deprecated header. * benchmark.h: Attach DEPRECATED warning to external use of benchmark.h's time_trial(). * bit.h: Remove bit_cast that's had deprecation warnings for several releases, and add deprecation warnings to the old rotl32 and rotl64 * color.h: add deprecation warnings and make the deprecated things inline so they can be removed later without an ABI break. * errorhandler.h: remove deprecated old printf style methods --------- Signed-off-by: Larry Gritz <[email protected]>
- Loading branch information
Showing
14 changed files
with
101 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<!-- SPDX-License-Identifier: CC-BY-4.0 --> | ||
<!-- Copyright Contributors to the OpenImageIO Project. --> | ||
|
||
OpenImageIO 3.0 Deprecations | ||
============================ | ||
|
||
For minor or patch releases, we try very hard to never fully remove | ||
functionality that will force downstream applications using OpenImageIO to | ||
change their source code. However, for major releases (e.g., 2.x -> 3.0), | ||
which only occur once every several years, we allow removal of functionality. | ||
|
||
OpenImageIO v3.0 is a major release that includes removal of many | ||
long-deprecated API facets. This document lists the deprecations and removals. | ||
|
||
### Glossary | ||
|
||
- "Marked as deprecated" means that we consider an API facet to be obsolete, | ||
and document it as such in the comments or documentation (or remove it from | ||
the documentation). | ||
|
||
- "Deprecation warning" means that a deprecated function is tagged with | ||
attributes that should cause a compiler warning if the function is used. The | ||
warning can be disabled by the downstream project, but it is recommended | ||
that you fix the code to use the new API before it is permanently removed. | ||
|
||
- "Removed" means that the deprecated API facet has been removed from the | ||
library completely. | ||
|
||
|
||
--- | ||
|
||
|
||
## array_view.h | ||
|
||
* This header has been eliminated. It originally had the template `array_view`, | ||
which many years ago was renamed `span<>` and lives in span.h, and since then | ||
the array_view.h header has merely made an alias. | ||
|
||
## bit.h | ||
|
||
* The `bit_cast` template, which was deprecated and warned since 2.5, has been | ||
removed. It was confusing because C++23 has a `std::bit_cast` that used the | ||
reverse order of arguments. Users should instead use `std::bit_cast` (if | ||
C++23) or the equivalent `OIIO::bitcast`. | ||
* The `rotl32` and `rotl64` functions which have been marked as deprecated | ||
since 2.1 now have deprecation warnings. Use `rotl` instead. | ||
|
||
## benchmark.h | ||
|
||
* The full `time_trial()` function now has deprecation warnings. Users should | ||
generally use the `Benchmrker` class instead. | ||
* The abbreviated `time_trial()` function (that lacks a `repeats` parameter | ||
has been removed. | ||
|
||
## color.h | ||
|
||
* `ColorConfig::error()` now has a deprecation warning. Use | ||
`ColorConfig::has_error()` instead. | ||
* The versions of `createDisplayTransform()` that lack an `inverse` parameter | ||
now have deprecation warnings. Use the version that takes an `inverse` bool. | ||
|
||
## errorhandler.h | ||
|
||
* All of the old methods that did printf-style formatting have been deprecated | ||
(info/infof, warning/warningf, error/errorf, severe/severef, | ||
message/messagef, debug/debugf). Instead, use infofmt, warningfmt, errorfmt, | ||
severefmt, messagefmt, debugfmt, respectively, which all use the std::format | ||
notation. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.