summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/libcamera/base/class.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/libcamera/base/class.h b/include/libcamera/base/class.h
index a07dac05..8212c3d4 100644
--- a/include/libcamera/base/class.h
+++ b/include/libcamera/base/class.h
@@ -33,14 +33,24 @@ namespace libcamera {
#define LIBCAMERA_DECLARE_PRIVATE() \
public: \
class Private; \
- friend class Private;
+ friend class Private; \
+ template <bool B = true> \
+ const Private *_d() const \
+ { \
+ return Extensible::_d<Private>(); \
+ } \
+ template <bool B = true> \
+ Private *_d() \
+ { \
+ return Extensible::_d<Private>(); \
+ }
#define LIBCAMERA_DECLARE_PUBLIC(klass) \
friend class klass; \
using Public = klass;
#define LIBCAMERA_D_PTR() \
- _d<Private>();
+ _d();
#define LIBCAMERA_O_PTR() \
_o<Public>();