Skip to content
Snippets Groups Projects
Commit 53c3ad8b authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add explicit qualifier to size constructor

This prevent some weird implicit constructions that could occur
chaining implicit conversions
parent 4e417583
Branches
Tags
1 merge request!63Feature/utils coverage
...@@ -75,7 +75,7 @@ class [[nodiscard]] Array ...@@ -75,7 +75,7 @@ class [[nodiscard]] Array
Array& operator=(Array&&) = default; Array& operator=(Array&&) = default;
PUGS_INLINE PUGS_INLINE
Array(size_t size) : m_values("anonymous", size) explicit Array(size_t size) : m_values("anonymous", size)
{ {
static_assert(not std::is_const<DataType>(), "Cannot allocate Array of const data: only view is " static_assert(not std::is_const<DataType>(), "Cannot allocate Array of const data: only view is "
"supported"); "supported");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment