static_assert is a compiler directive. You canIt allows you to check type information at compile time. It will cause a compilation failure and produce an error message that in most IDE's be caught and displayed in the IDE's error window.
static_assert(sizeof(int) == 4,"int should be 4 bytes"); assert is for runtime, you can check a variable's value. If the assertion fails then the assertion will trigger. This will cause an error message box that will appear at runtime in some Operating systems (assert implementation dependent)
assert(("mypointer shuoldshould never be null!", mypointer != nullptr));