diff --git a/dispatchkit/boxed_value.hpp b/dispatchkit/boxed_value.hpp index 1f08403..00b8160 100644 --- a/dispatchkit/boxed_value.hpp +++ b/dispatchkit/boxed_value.hpp @@ -256,7 +256,9 @@ namespace dispatchkit template struct Cast_Helper { - typename boost::reference_wrapper::type > operator()(Boxed_Value ob) + typedef typename boost::reference_wrapper::type > Result_Type; + + Result_Type operator()(Boxed_Value ob) { if (ob.is_ref()) { @@ -270,7 +272,9 @@ namespace dispatchkit template struct Cast_Helper { - typename boost::reference_wrapper::type > operator()(Boxed_Value ob) + typedef typename boost::reference_wrapper::type > Result_Type; + + Result_Type operator()(Boxed_Value ob) { if (ob.is_ref()) { @@ -284,7 +288,9 @@ namespace dispatchkit template struct Cast_Helper { - const Result *operator()(Boxed_Value ob) + typedef const Result * Result_Type; + + Result_Type operator()(Boxed_Value ob) { if (ob.is_ref()) { @@ -298,7 +304,9 @@ namespace dispatchkit template struct Cast_Helper { - Result *operator()(Boxed_Value ob) + typedef Result * Result_Type; + + Result_Type operator()(Boxed_Value ob) { if (ob.is_ref()) { @@ -312,7 +320,9 @@ namespace dispatchkit template struct Cast_Helper { - typename boost::reference_wrapper operator()(Boxed_Value ob) + typedef typename boost::reference_wrapper Result_Type; + + Result_Type operator()(Boxed_Value ob) { if (ob.is_ref()) { @@ -326,7 +336,9 @@ namespace dispatchkit template struct Cast_Helper > { - typename boost::shared_ptr operator()(Boxed_Value ob) + typedef typename boost::shared_ptr Result_Type; + + Result_Type operator()(Boxed_Value ob) { return boost::any_cast >(ob.get()); } @@ -336,7 +348,9 @@ namespace dispatchkit template<> struct Cast_Helper { - Boxed_Value operator()(Boxed_Value ob) + typedef Boxed_Value Result_Type; + + Result_Type operator()(Boxed_Value ob) { return ob; }