diff --git a/include/linuxdeploy/util/assert.h b/include/linuxdeploy/util/assert.h new file mode 100644 index 0000000..e92b7ed --- /dev/null +++ b/include/linuxdeploy/util/assert.h @@ -0,0 +1,17 @@ +#pragma once + +// system headers +#include + +namespace linuxdeploy { + namespace util { + namespace assert { + template + void assert_not_empty(T container) { + if (container.empty()) { + throw std::invalid_argument{"container must not be empty"}; + } + } + } + } +}