etl
280c3098 - Avoid 'missing return statement at end of non-void function' in `etl::visit<>()`. (#645)

Commit
1 year ago
Avoid 'missing return statement at end of non-void function' in `etl::visit<>()`. (#645) * Avoid 'missing return statement at end of non-void function' in `etl::visit<>()`. For some definitions of `ETL_ASSERT()` there may be no return statement in case of an invalid type. This results in undefined behavior. Warning[Pe940]: missing return statement at end of non-void function "etl::visit<TReturn,TVisitor,TVariant>(TVisitor &, TVariant const &) include\etl\private\variant_legacy.h 976 * Use more self-explaining code. Substitute ET_ASSERT() and return by dedicated macro. This moves the responsibility of how to handle errors to the dedicated place.
Author
Committer
Parents
Loading