* Run clang-format with claude code and fix VS warnings
* More clang-format
* And the tests too
* Cleanup from clang-tidy
* More constness and modernization
* Cleanup and modernization
1. add integer codes to exceptions (to address #381 No1);
2. restructure derived exceptions to be specializations of templated
classes to make their definitions more compact, and remove code
duplication.