Commit 0b6b6ce1 authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: StaticAssert to avoid invalid sizing in DynamicField, DynamicList

parent 2ec13249
......@@ -44,6 +44,7 @@ SourceFiles
#define DynamicList_H
#include "List.H"
#include "StaticAssert.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -78,6 +79,9 @@ class DynamicList
:
public List<T>
{
//- Avoid invalid sizing parameters
StaticAssert((SizeInc || SizeMult) && SizeDiv);
// Private data
//- The capacity (allocated size) of the underlying list.
......
......@@ -37,6 +37,7 @@ SourceFiles
#define DynamicField_H
#include "Field.H"
#include "StaticAssert.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -71,6 +72,9 @@ class DynamicField
:
public Field<T>
{
//- Avoid invalid sizing parameters
StaticAssert((SizeInc || SizeMult) && SizeDiv);
// Private data
//- The capacity (allocated size) of the underlying field.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment