mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[libaxx] Add algorithm
Only contains a super simple min and max implementation
This commit is contained in:
18
libaxx/include/algorithm
Normal file
18
libaxx/include/algorithm
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef LIBAXX_ALGORITHM
|
||||
#define LIBAXX_ALGORITHM
|
||||
|
||||
namespace std {
|
||||
|
||||
template<class T>
|
||||
inline const T & min(const T & a, const T & b ) {
|
||||
return (b < a) ? b : a;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
inline const T & max(const T & a, const T & b ) {
|
||||
return (b > a) ? b : a;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user