diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:39:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:39:03 +0000 |
commit | 408c608fc7bf1557ee987dd7fbe662fabed21a53 (patch) | |
tree | 8b07135336de378134bfedc808d49747174810d3 /examples/static_assert.cpp | |
parent | Initial commit. (diff) | |
download | frozen-408c608fc7bf1557ee987dd7fbe662fabed21a53.tar.xz frozen-408c608fc7bf1557ee987dd7fbe662fabed21a53.zip |
Adding upstream version 1.1.1.upstream/1.1.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'examples/static_assert.cpp')
-rw-r--r-- | examples/static_assert.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/static_assert.cpp b/examples/static_assert.cpp new file mode 100644 index 0000000..0899292 --- /dev/null +++ b/examples/static_assert.cpp @@ -0,0 +1,9 @@ +#include <frozen/set.h> + +static constexpr frozen::set<unsigned, 3> supported_sizes = { + 1, 2, 4 +}; + +static_assert(supported_sizes.count(sizeof(short)), "unsupported size"); + +int main() { return 0; } |