Open MoonPadUSer opened 4 years ago
Why was this done? What is the reason to use min and max from std?
yes, we wanna get rid of most custom written functions and types and switch to using their standard alternatives. that way we might be able to get rid of geom.h and tools.h some day
Why do we not want to have geom.h and tools.h?
Many of the things written in tools.h
behave in strange ways, hide memory problems or behave unexpectedly otherwise. Also, they're redundant to the STL. And they lack the necessary interface so you cannot use STL algorithms with them. They don't support modern C++ features like e.g., rvalue references. There is no point in having implemented everything by yourself. The STL is well tested and known to work, also most C++ developers know how to use it.
Also, most headers with these custom template classes are e.g., included more than once, among with other weirdnesses. I've never seen code have to include headers more than once without having header guards or #pragma once
the way it's done here.
@MoonPadUSer can you please rebase and squash both this and #189?
This PR removes the custom implementation of
min()
andmax()
and replaces it withstd::min()
andstd::max()