CarbonBasedDudeform / Game-Engine-For-Fun

One of them game engines made for fun.
MIT License
1 stars 1 forks source link

max class size? #25

Open CarbonBasedDudeform opened 4 years ago

CarbonBasedDudeform commented 4 years ago

add a static assert to jobs or scene manager to ensure classes don't grow too big, encouraging breaking down classes into components that do one thing and one thing only by keeping them smol.

something like template constexpr bool WithinLimits() { return sizeof(T) < max_class_limit; } static_assert(WithinLimits(), "Class too big for system"); ?