Improved error handling, notably using static_assert instead of returning TCL_ERROR for unimplemented types