Improve cast documentation and improve optional functions
Added documentation for literal
Use function instead of macro in CMake
Update requirements