[libcamera-devel] [PATCH v2 0/2] libcamera: revert C++17 specific code for public API

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Jan 26 22:18:57 CET 2021


Hi Jean-Michel,

Thank you for the patch.

On Tue, Jan 26, 2021 at 02:04:13PM +0100, Jean-Michel Hautbois wrote:
> Some applications may not be compliant with C++17 (Chromium, as an
> example). Keep the C++17 features for libcamera internals, and C++14
> compliance for public API.

This should be captured in the commit message of the two patches, as the
cover letter won't end up in the git history.

The series make sense, the more lightweight our requirements will be in
terms of modern features in the public API, the more applications will
be able to use libcamera. libcamera itself stays C++17, but at this
point of time, sticking to C++14 in the public API isn't a huge hassle.

This is of course a matter of finding a proper balance, I'm sure we will
eventually want to move the public API to C++17 too. Chromium is the
only application I'm aware of that is affected by the lack of C++17
support, and it will eventually get migrated, solving this particular
issue. We will then be able to revert the reverts, if desired.

I've also been wondering if the libcamera integration in Chromium could
be compiled with -std=c++17, with the rest of the browser still compiled
in C++14 mode. It could be useful to get a confirmation from Google on
whether this is possible or not. I've asked and am waiting for feedback,
but this isn't blocking and we can move ahead with this series.

With the commit message updated (which can be done when applying),

Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

I'll give others a few days to shime in if desired before pushing this.

> ---
> Changes in v2:
> - keep each revert separate
> 
> Jean-Michel Hautbois (2):
>   Revert "libcamera: span: Provide and use helper variable templates for
>     type traits"
>   Revert "libcamera: Use helper variable template for type traits"
> 
>  include/libcamera/bound_method.h |  2 +-
>  include/libcamera/controls.h     | 24 +++++------
>  include/libcamera/object.h       |  2 +-
>  include/libcamera/signal.h       |  4 +-
>  include/libcamera/span.h         | 70 +++++++++++++++-----------------
>  5 files changed, 48 insertions(+), 54 deletions(-)

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list