src
utility
PimplImpl.hpp
Go to the documentation of this file.
1
// https://herbsutter.com/gotw/_101/
2
#pragma once
3
4
#include <utility>
5
6
namespace
dai
{
7
8
template
<
typename
T>
9
Pimpl<T>::Pimpl
() : m{
new
T{} } { }
10
11
template
<
typename
T>
12
template
<
typename
...Args>
13
Pimpl<T>::Pimpl
( Args&& ...args )
14
: m{
new
T{ std::forward<Args>(args)... } } { }
15
16
template
<
typename
T>
17
Pimpl<T>::~Pimpl
() { }
18
19
template
<
typename
T>
20
T*
Pimpl<T>::operator->
() {
return
m.get(); }
21
22
template
<
typename
T>
23
T&
Pimpl<T>::operator*
() {
return
*m.get(); }
24
25
}
// namespace dai
dai::Pimpl
Definition:
Pimpl.hpp:10
dai::Pimpl::Pimpl
Pimpl()
Definition:
PimplImpl.hpp:9
dai
Definition:
CameraExposureOffset.hpp:6
depthai
Author(s): Martin Peterlin
autogenerated on Sat Mar 22 2025 02:58:19