Substituted assert using exception. Added docu.

Using std::invalid_argument exception instead of assert leads to
error messages both in release and debug version.
Added exception to handle invalid input and docu.

Added exception std::invalid_argument to constructor of class template TemplateVec.
Made documentation more specific.