summaryrefslogtreecommitdiffstats
path: root/src/2geom/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/2geom/utils.h')
-rw-r--r--src/2geom/utils.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/2geom/utils.h b/src/2geom/utils.h
index a96a34dff..50dfa82fe 100644
--- a/src/2geom/utils.h
+++ b/src/2geom/utils.h
@@ -1,5 +1,5 @@
-#ifndef UTILS_HEADER
-#define UTILS_HEADER
+#ifndef LIB2GEOM_UTILS_HEADER
+#define LIB2GEOM_UTILS_HEADER
/** Various utility functions.
*
@@ -40,6 +40,11 @@ public:
NotImplemented() : std::logic_error("method not implemented") {}
};
+class NotInvertible : public std::range_error {
+ public:
+ NotInvertible() : std::range_error("function does not have a unique inverse") {}
+};
+
// proper logical xor
inline bool logical_xor (bool a, bool b) { return (a || b) && !(a && b); }