libcamera: base: log: Ignore deprecations
`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.
The specialization is available since gcc (libstdc++) 12 and llvm (libc++) 15.
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
This commit is contained in:
@@ -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_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user