aboutsummaryrefslogtreecommitdiff
path: root/paludis/util/visitor_cast-fwd.hh
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/util/visitor_cast-fwd.hh')
-rw-r--r--paludis/util/visitor_cast-fwd.hh4
1 files changed, 3 insertions, 1 deletions
diff --git a/paludis/util/visitor_cast-fwd.hh b/paludis/util/visitor_cast-fwd.hh
index 5fdfa2919..06ea2e46c 100644
--- a/paludis/util/visitor_cast-fwd.hh
+++ b/paludis/util/visitor_cast-fwd.hh
@@ -21,10 +21,12 @@
#define PALUDIS_GUARD_PALUDIS_UTIL_VISITOR_CAST_FWD_HH 1
#include <paludis/util/attributes.hh>
+#include <type_traits>
namespace paludis
{
- template <typename To_, typename From_>
+ template <typename To_, typename From_,
+ typename = typename std::enable_if<std::is_base_of<From_, To_>::value>::type>
To_ * visitor_cast(From_ &) PALUDIS_ATTRIBUTE((warn_unused_result));
}