5 ms·
> Don't put the return type on a separate line. Generally yes, but stuff like ReturnType<SomeOther<S, TypeConstructor<Nested<S, T, U>, T>>, U, HmmLetsAdd<V
by ReleaseCandidat 2y ago
> Don't put the return type on a separate line.
Generally yes, but stuff like
ReturnType<SomeOther<S, TypeConstructor<Nested<S, T, U>, T>>, U, HmmLetsAdd<V, W>>
can be on a line of its own.
- cletus 2y agoI generally agree but there are two problems: 1. You're writing C++. You've really lost half the battle laready :) and 2. Writing correct templated code is difficult and should generally be reserved for when you're writing a library; and 3. For complicatred types like this, one should strive to increase readability by using type aliases, assuming your language supports it (eg C++ and Hack do). It's not always possible.
- CRConrad 2y agoComplicatred: The hatred we feel for complication.
- Mawr 2y agoReturnType< SomeOther< S, TypeConstructor< Nested<S, T, U>, T, >, >, U, HmmLetsAdd<V, W>, >