Time Nick Message 16:06 MTDiscord what should our code style guidelines say about generic parameters which we expect to always be trivially copyable 16:06 MTDiscord should we use const refs or not? 16:07 MTDiscord i'm leaning towards not because it's more readable, e.g. static CMatrix4 scale(T x, T y, T z) 16:14 MTDiscord Tbh I don't think const ref makes much sense for int 16:15 MTDiscord Because passing a ref is not more performant than passing a pointer, which in turn is essentially an integer. 16:16 MTDiscord Same goes for floats 16:17 MTDiscord So, if it makes code less readable and is not an optimization (in fact, it's likely to be optimized out by the compiler), I'd leave it out. 16:19 MTDiscord it doesn't make sense for types that are less than a pointer and i expect it to leave it out. 16:20 MTDiscord what makes the style question less obvious for generics is that i technically don't know what T will be in the future. but i expect it to always be trivially and efficiently copyable. hence why i'm going with T. 16:25 MTDiscord Yeah that makes sense. Universal references are for a different problem, right? 16:27 MTDiscord universal references make sense if, in theory, you expect something heavier in the future. say maybe bignums. but i don't think that's realistic. 16:33 sfan5 const T& is the safe option when doing templates