[v4,03/22] libcamera: base: Add file for C++20 polyfills
diff mbox series

Message ID 20260106165754.1759831-4-barnabas.pocze@ideasonboard.com
State New
Headers show
Series
  • libcamera: Add `MetadataList`
Related show

Commit Message

Barnabás Pőcze Jan. 6, 2026, 4:57 p.m. UTC
Add `cxx20.h` that will contain (possibly limited) C++17 implementations
of some C++20 standard library features.

Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 include/libcamera/base/internal/cxx20.h | 18 ++++++++++++++++++
 include/libcamera/base/meson.build      |  7 +++++++
 2 files changed, 25 insertions(+)
 create mode 100644 include/libcamera/base/internal/cxx20.h

Patch
diff mbox series

diff --git a/include/libcamera/base/internal/cxx20.h b/include/libcamera/base/internal/cxx20.h
new file mode 100644
index 000000000..70a43f83c
--- /dev/null
+++ b/include/libcamera/base/internal/cxx20.h
@@ -0,0 +1,18 @@ 
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2025, Ideas on Board Oy
+ *
+ * C++20 polyfills
+ */
+
+#pragma once
+
+/**
+ * \internal
+ * \file cxx20.h
+ * \brief C++17 implementations of certain C++20 types and functions
+ */
+
+namespace libcamera::internal::cxx20 {
+
+} /* namespace libcamera::internal::cxx20 */
diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build
index f84b51419..bb4ed556b 100644
--- a/include/libcamera/base/meson.build
+++ b/include/libcamera/base/meson.build
@@ -32,10 +32,17 @@  libcamera_base_private_headers = files([
     'utils.h',
 ])
 
+libcamera_base_internal_headers = files([
+    'internal/cxx20.h',
+])
+
 libcamera_base_headers = [
     libcamera_base_public_headers,
     libcamera_base_private_headers,
+    libcamera_base_internal_headers,
 ]
 
 install_headers(libcamera_base_public_headers,
                 subdir : libcamera_base_include_dir)
+install_headers(libcamera_base_internal_headers,
+                subdir : libcamera_base_include_dir / 'internal')