From 1fb95328007f8c5c7031c68385f7a0f445c1e28a Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 22 Jun 2016 22:46:01 +0100 Subject: Determine return type based on second arg to all chaining --- icespider/core/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icespider/core/util.h b/icespider/core/util.h index 638660c..075f237 100644 --- a/icespider/core/util.h +++ b/icespider/core/util.h @@ -5,7 +5,7 @@ namespace IceUtil { template - T operator/(const IceUtil::Optional & o, const TF & tf) + auto operator/(const IceUtil::Optional & o, const TF & tf) -> decltype(tf()) { if (o) return *o; return tf(); -- cgit v1.2.3