| Message ID | 20260107193607.2168539-4-barnabas.pocze@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
Hi Barnabás, Thank you for the patch. On Wed, Jan 07, 2026 at 08:36:05PM +0100, Barnabás Pőcze wrote: > `std::atomic_{load,store}()` with `std::shared_ptr` has been deprecated > in C++20 in favour of `std::atomic<std::shared_ptr<>>`. However, it is > not available on all supported platforms. So ignore the deprecation warnings. Could you please list the platforms that are missing it ? With that, Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > --- > src/libcamera/base/log.cpp | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/src/libcamera/base/log.cpp b/src/libcamera/base/log.cpp > index 6e6d2887c..b28217750 100644 > --- a/src/libcamera/base/log.cpp > +++ b/src/libcamera/base/log.cpp > @@ -326,6 +326,11 @@ private: > std::vector<std::unique_ptr<LogCategory>> categories_ LIBCAMERA_TSA_GUARDED_BY(mutex_); > std::list<std::pair<std::string, LogSeverity>> levels_; > > + /* > + * \todo Use `std::atomic<std::shared_ptr<>>` and drop the pragma > + * once it works on all supported platforms. > + */ > +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" > std::shared_ptr<LogOutput> output_; > }; >
diff --git a/src/libcamera/base/log.cpp b/src/libcamera/base/log.cpp index 6e6d2887c..b28217750 100644 --- a/src/libcamera/base/log.cpp +++ b/src/libcamera/base/log.cpp @@ -326,6 +326,11 @@ private: std::vector<std::unique_ptr<LogCategory>> categories_ LIBCAMERA_TSA_GUARDED_BY(mutex_); std::list<std::pair<std::string, LogSeverity>> levels_; + /* + * \todo Use `std::atomic<std::shared_ptr<>>` and drop the pragma + * once it works on all supported platforms. + */ +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" std::shared_ptr<LogOutput> output_; };
`std::atomic_{load,store}()` with `std::shared_ptr` has been deprecated in C++20 in favour of `std::atomic<std::shared_ptr<>>`. However, it is not available on all supported platforms. So ignore the deprecation warnings. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> --- src/libcamera/base/log.cpp | 5 +++++ 1 file changed, 5 insertions(+)