libcamera: utils: Don't use C++17 nested namespaces
Nesting namespace names in a single namespace declaration is a C++17 feature. As libcamera depends on C++11 only, nest two separate namespace declarations instead. Reported-by: Shik Chen <shik@google.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
parent
479264dfca
commit
576c9454cf
1 changed files with 6 additions and 2 deletions
|
@ -11,7 +11,9 @@
|
||||||
|
|
||||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
|
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
|
||||||
|
|
||||||
namespace libcamera::utils {
|
namespace libcamera {
|
||||||
|
|
||||||
|
namespace utils {
|
||||||
|
|
||||||
/* C++11 doesn't provide std::make_unique */
|
/* C++11 doesn't provide std::make_unique */
|
||||||
template<typename T, typename... Args>
|
template<typename T, typename... Args>
|
||||||
|
@ -20,6 +22,8 @@ std::unique_ptr<T> make_unique(Args&&... args)
|
||||||
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
|
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
|
||||||
}
|
}
|
||||||
|
|
||||||
} /* namespace libcamera::utils */
|
} /* namespace utils */
|
||||||
|
|
||||||
|
} /* namespace libcamera */
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_UTILS_H__ */
|
#endif /* __LIBCAMERA_UTILS_H__ */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue