From 6d312af51acfc922a61a635d3da90b9acd45e62b Mon Sep 17 00:00:00 2001 From: Dirk Stolle Date: Thu, 26 May 2022 08:58:19 +0200 Subject: [PATCH] chore!: deprecate any_color_converted_view (#678) color_converted_view has the same implementation and can be used as a replacement, providing the same functionality. This builds on #660 by @marco-langer (Thank you!) Due to the fact that the switch to C++14 has been announced in #677, we can now officially use the [[deprecated]] attribute which was standardized in C++14. This is initial part of deprecating the `any_color_converted_view` and as @marco-langer pointed in https://github.com/boostorg/gil/pull/660#issuecomment-1138183545 there are more changes to follow. --- RELEASES.md | 2 ++ .../boost/gil/extension/dynamic_image/image_view_factory.hpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/RELEASES.md b/RELEASES.md index 296a8c9c1b..fc12f0c8d2 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -26,6 +26,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). Currently, large parts of GIL still compile with a C++11 compiler. However, there is no guarantee that it stays that way, and any compilers that do not support at least C++14 are considered unsupported as of now. +- BREAKING: `any_color_converted_view()` is deprecated and will be removed in the next release. + Use `color_converted_view()` instead, which provides the same feature. - documentation: Display that GIL is a header-only library - Moved numeric extension to core ([PR #573](https://github.com/boostorg/gil/pull/573)) - Added support for C++17's `` ([PR #636](https://github.com/boostorg/gil/pull/636)). diff --git a/include/boost/gil/extension/dynamic_image/image_view_factory.hpp b/include/boost/gil/extension/dynamic_image/image_view_factory.hpp index fe88222a14..1418f162f1 100644 --- a/include/boost/gil/extension/dynamic_image/image_view_factory.hpp +++ b/include/boost/gil/extension/dynamic_image/image_view_factory.hpp @@ -379,6 +379,7 @@ auto color_converted_view(any_image_view const& src) /// These are workarounds for GCC 3.4, which thinks color_converted_view is ambiguous with the same method for templated views (in gil/image_view_factory.hpp) /// \tparam Views Models Boost.MP11-compatible list of models of ImageViewConcept template +[[deprecated("Use color_converted_view(const any_image_view& src, CC) instead.")]] inline auto any_color_converted_view(const any_image_view& src, CC) -> typename color_converted_view_type, DstP, CC>::type @@ -392,6 +393,7 @@ auto any_color_converted_view(const any_image_view& src, CC) /// These are workarounds for GCC 3.4, which thinks color_converted_view is ambiguous with the same method for templated views (in gil/image_view_factory.hpp) /// \tparam Views Models Boost.MP11-compatible list of models of ImageViewConcept template +[[deprecated("Use color_converted_view(any_image_view const& src) instead.")]] inline auto any_color_converted_view(const any_image_view& src) -> typename color_converted_view_type, DstP>::type