summaryrefslogtreecommitdiff
path: root/src/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.h')
-rw-r--r--src/utils.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utils.h b/src/utils.h
index 7bc90fb6..cf1cd1d0 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -521,6 +521,11 @@ inline void throw_unexpected_error(char, char) {
namespace ledger {
+template <typename T, typename U>
+inline T& downcast(U& object) {
+ return *polymorphic_downcast<T *>(&object);
+}
+
path resolve_path(const path& pathname);
#ifdef HAVE_REALPATH