diff options
author | justanothercatgirl <sotov@twistea.su> | 2025-04-17 12:48:23 +0300 |
---|---|---|
committer | justanothercatgirl <sotov@twistea.su> | 2025-04-17 12:48:23 +0300 |
commit | 0bd2ab4d1f9e8fdbf55ed11d61fe2e75720a334a (patch) | |
tree | 59f91bead63e9f68f74dafd73b68491286eabcf7 /libprakpp/include/prakcommon.hpp | |
parent | 45f12ba19761024d335407793ffb8d4823b28149 (diff) |
finished 206, 207
Diffstat (limited to 'libprakpp/include/prakcommon.hpp')
-rw-r--r-- | libprakpp/include/prakcommon.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libprakpp/include/prakcommon.hpp b/libprakpp/include/prakcommon.hpp index 074e290..dcafecf 100644 --- a/libprakpp/include/prakcommon.hpp +++ b/libprakpp/include/prakcommon.hpp @@ -1,5 +1,7 @@ #pragma once +#include <cstddef> +#include <cstdint> #include <cmath> #include <functional> #include <vector> @@ -132,3 +134,7 @@ template <typename T> struct pvalue<T> operator-(const T &a, const struct pvalue template <typename T> std::ostream &operator<<(std::ostream &os, const struct pvalue<T> &p) { return os << p.val << "±" << p.err; } } // namespace prak + +namespace std { +template <typename T> struct prak::pvalue<T> abs(const struct prak::pvalue<T> &p) { return {abs(p.val), abs(p.err)}; } +} |