[ox] Add file:line error tracing

This commit is contained in:
2018-05-31 22:45:57 -05:00
parent 956415a6a2
commit ea7cf59ec7
17 changed files with 438 additions and 215 deletions

View File

@@ -13,17 +13,17 @@
namespace ox {
template<typename T>
inline const T &min(const T &a, const T &b) {
inline constexpr const T &min(const T &a, const T &b) {
return a < b ? a : b;
}
template<typename T>
inline const T &max(const T &a, const T &b) {
inline constexpr const T &max(const T &a, const T &b) {
return a > b ? a : b;
}
template<typename I>
inline I pow(I v, int e) {
inline constexpr I pow(I v, int e) {
I out = 1;
for (I i = 0; i < e; i++) {
out *= v;