Takeaways. Try to use "friend" on functions/operators that are frequently overloaded EXCEPT if they are in a templated type that is frequently instantiated. So do not put friends in TMap, TSet, TObjectPtr etc, this will slow down compile times. There is a break-even somewhere and hard to tell where it is but taking a class that is templatized on character type probably don't matter either way and then it is nicer to use a friend since that simplies error messages when compiler can't resolve functions/operators.
If it is possible to use member functions instead of friend that is the best option in terms of compile time performance. With c++20 you only have to write operator==(Foo, Bar) and the compiler will automatically provide operator==(Bar, Foo), operator!=(Foo, Bar) and operator!=(Bar, Foo).
Changes in this changelist involes
* Making operator<< friends in non-template types and not friends in template types
* Making operator==/!= members where possible and if not possible moved out if type is a frequently instantiated templated type.
#preflight 636970f5376a9cd6a80da54a
#rb steve.robb
[CL 23038965 by henrik karlsson in ue5-main branch]
Add them for TMap and TSet as well, but keep them private for now since the write does not sort the keys and hence has determinism problems if used in persistent storage.
#rb Devin.Doucette
#rnx
#preflight 62cc993e1a786c1bbcf90183
[CL 21048418 by Matt Peters in ue5-main branch]
Core public headers still will contain CoreMinimal.h if any included it before my IWYU changes.
#preflight 62c73594756222ced4e48707
[CL 20991367 by bryan sefcik in ue5-main branch]
Things to note regarding this pass:
* No includes are currently being removed from public headers.
* Any private file that has a #if is currently not being updated.
#preflight 62c703bbd13fac04f11da948
[CL 20985655 by bryan sefcik in ue5-main branch]
Things to note regarding this pass:
* No includes are currently being removed from public headers.
* Any private file that has a #if is currently not being updated.
#rb Devin Doucette and Marc Audy
#preflight 62c62086756222ced497ff95
#preflight 62c626d12f2d04691814d331
#preflight 62c630107e606620fdd64e31
#preflight 62c635c6756222ced49a13cf
[CL 20979027 by bryan sefcik in ue5-main branch]
The intent is that function take a field and an output parameter, with an optional default value:
bool LoadFromCompactBinary(FCbFieldView Field, FTypeName& OutValue, FTypeName Default = {});
Implementations must return true if the field was loaded successfully, and false if any required part of the field was missing or its value had the wrong type or range. The output value must be assigned before the function returns.
#rb Zousar.Shaker
#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 20741864 via CL 20743724 via CL 20744635
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v970-20704180)
[CL 20751365 by devin doucette in ue5-main branch]
#rb ben.ingram
#ROBOMERGE-AUTHOR: robert.millar
#ROBOMERGE-SOURCE: CL 20115901 via CL 20115948 via CL 20115961 via CL 20115990
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)
[CL 20117747 by robert millar in ue5-main branch]
Added FPooledLargeMemoryData that allows lockless access to temporary memory blocks.
#tests Squads games on WSL, using FramePro to validate performance gains
#rb danny.couture,jamie.dale
#ROBOMERGE-AUTHOR: ilya.loshchinin
#ROBOMERGE-SOURCE: CL 19970339 via CL 19971380 via CL 19972286
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)
[CL 19974304 by ilya loshchinin in ue5-main branch]