using static_cast instead of c cast
warn if not all requirements for doc are fullfilled