If you put a static assert inside the function, then yes, it wouldn't be possible to import the module at all.

What I meant is simply not declaring the function (or making it a template function with a static assert inside, then it indeed doesn't trigger until it's actually used).